/* ============================================
   AC TECH - COMPONENTS
   Reusable UI Component Library
   ============================================ */

/* ===== GLASSMORPHISM CARDS ===== */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow:
    var(--shadow-lg),
    var(--shadow-inner-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-normal);
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  pointer-events: none;
}

.glass-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow-sm);
}

/* Card Variants */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: var(--transition-normal);
}

.card-hover:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
  transform: translateY(-4px);
}

.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--brand-primary-gradient);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: var(--transition-normal);
}

.card-glow:hover::after {
  opacity: 1;
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0 var(--brand-primary-glow);
}

.btn-primary:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary-light);
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--brand-primary-dark);
  transform: translateY(0);
}

/* Gradient Primary */
.btn-gradient {
  background: var(--brand-primary-gradient);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-shine);
  background-size: 200% 100%;
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.btn-gradient:hover {
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-2px);
}

/* Secondary Button */
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-overlay);
  border-color: var(--border-strong);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline:hover {
  background: var(--brand-primary-glow);
}

/* Button Sizes */
.btn-xs {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
  border-radius: var(--radius-xl);
}

.btn-icon {
  padding: var(--space-3);
}

.btn-block {
  width: 100%;
}

/* ===== INPUTS ===== */

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-glow);
}

.input-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

textarea.input {
  min-height: 120px;
  resize: vertical;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 18px;
  padding-right: var(--space-10);
}

/* ===== BADGES ===== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  border-radius: var(--radius-full);
  background: var(--bg-overlay);
  color: var(--text-secondary);
}

.badge-primary {
  background: var(--brand-primary-glow);
  color: var(--brand-primary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-info);
}

.badge-outline {
  background: transparent;
  border: 1px solid currentColor;
}

/* ===== NAVIGATION ===== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.logo:hover {
  color: var(--brand-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary-gradient);
  border-radius: var(--radius-lg);
  color: white;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--brand-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
}

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg video,
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(3, 7, 18, 0.3) 0%,
    rgba(3, 7, 18, 0.8) 50%,
    var(--bg-base) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ===== CODE BLOCKS ===== */

.code-block {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.code-dots {
  display: flex;
  gap: var(--space-2);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot:nth-child(1) { background: #EF4444; }
.code-dot:nth-child(2) { background: #F59E0B; }
.code-dot:nth-child(3) { background: #10B981; }

.code-lang {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

.code-copy {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.code-copy:hover {
  color: var(--text-primary);
  border-color: var(--brand-primary);
}

.code-content {
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  overflow-x: auto;
}

.code-content code {
  color: var(--text-secondary);
}

/* Syntax Highlighting Colors */
.hljs-keyword { color: #C792EA; }
.hljs-string { color: #C3E88D; }
.hljs-number { color: #F78C6C; }
.hljs-function { color: #82AAFF; }
.hljs-comment { color: #546E7A; font-style: italic; }
.hljs-variable { color: #F07178; }

/* ===== FEATURE CARDS ===== */

.feature-card {
  position: relative;
  padding: var(--space-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  transition: var(--transition-normal);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-primary-gradient);
  opacity: 0;
  transition: var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary-glow);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
  color: var(--brand-primary);
}

.feature-icon.accent {
  background: var(--brand-accent-glow);
  color: var(--brand-accent);
}

.feature-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
}

.feature-description {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ===== PRODUCT CARDS ===== */

.product-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: var(--transition-normal);
}

.product-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl), var(--shadow-glow-primary);
}

.product-image {
  position: relative;
  height: 200px;
  background: var(--bg-surface);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

.product-body {
  padding: var(--space-5);
}

.product-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.product-description {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--brand-primary);
}

/* ===== MEGA PRODUCT SHOWCASE ===== */

.mega-card {
  position: relative;
  padding: var(--space-10);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  transition: var(--transition-slow);
}

.mega-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  pointer-events: none;
}

.mega-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-glow);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.mega-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.mega-card:hover::after {
  opacity: 1;
}

.mega-card-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-6);
}

.mega-card-icon.techair {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
}

.mega-card-icon.mui {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
}

.mega-card-icon.techquotas {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
}

.mega-card-title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-3);
}

.mega-card-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 400px;
}

.mega-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

/* ===== FOOTER ===== */

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-12);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand p {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s var(--ease-spring);
  min-width: 300px;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info { border-left: 3px solid var(--brand-primary); }

.toast-icon {
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-close {
  padding: var(--space-1);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

/* ===== LOADING STATES ===== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-overlay) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
