/* Core CSS variables aligned with premium dark/light layout */
:root {
  --primary-blue: #007BFF;
  --secondary-cyan: #00BFFF;
  --bg-slate: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --white: #ffffff;
  --border-light: #e2e8f0;
  --font-family: 'Plus Jakarta Sans', sans-serif;
  --shadow-card: 0 4px 20px -2px rgba(0, 123, 255, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 12px 30px -5px rgba(0, 123, 255, 0.12), 0 8px 20px -6px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-slate);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Consultation Top Bar */
.consultation-topbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 10px 0;
  font-size: 0.85rem;
  z-index: 1001;
}

.topbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar-text {
  font-weight: 500;
  letter-spacing: -0.2px;
}

.topbar-btn {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-cyan) 100%);
  color: var(--white);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Header */
.main-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 800;
  font-size: 1.4rem;
}

.logo-box {
  width: 36px;
  height: 36px;
  background-color: var(--primary-blue);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo span span {
  color: var(--primary-blue);
}

.nav-menu {
  display: flex;
  gap: 24px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-menu a.active, .nav-menu a:hover {
  color: var(--primary-blue);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.icon-btn {
  background: var(--white);
  border: 1px solid var(--border-light);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  color: var(--text-muted);
}

.icon-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  transform: translateY(-1px);
}

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--primary-blue);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* Hero Section */
.hero-promo {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.promo-grid {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.promo-content {
  z-index: 2;
}

.badge-promo {
  background-color: rgba(0, 123, 255, 0.08);
  color: var(--primary-blue);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 16px;
}

.promo-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.promo-content p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.btn {
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.promo-visual {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-orb {
  position: absolute;
  width: 250px;
  height: 250px;
  background-color: var(--secondary-cyan);
  filter: blur(80px);
  opacity: 0.25;
  border-radius: 50%;
  z-index: 1;
}

.hero-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Catalog */
.catalog-section {
  max-width: 1200px;
  margin: 20px auto 60px auto;
  padding: 0 20px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
}

.catalog-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
}

.catalog-filters {
  display: flex;
  gap: 8px;
}

.filter-tab {
  background: var(--white);
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.filter-tab:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.filter-tab.active {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

/* Grid & Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-img-container {
  height: 200px;
  overflow: hidden;
  background-color: #f1f5f9;
  position: relative;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover .card-img-container img {
  transform: scale(1.03);
}

.fav-card-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.fav-card-btn:hover {
  background: var(--white);
  color: #ef4444;
}

.fav-card-btn.favorited {
  color: #ef4444;
  fill: #ef4444;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 6px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  cursor: pointer;
}

.card-title:hover {
  color: var(--primary-blue);
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #fbbf24;
  margin-bottom: 16px;
}

.card-rating span {
  color: var(--text-muted);
  font-weight: 500;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.add-cart-btn {
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.add-cart-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}

/* Cart Drawer */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 1999;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--white);
  z-index: 2000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.close-drawer {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.drawer-body {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state i {
  width: 48px;
  height: 48px;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-slate);
}

.subtotal-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.btn-checkout {
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: block;
  text-align: center;
  width: 100%;
}

.btn-checkout:hover {
  background: #0056b3;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary-blue);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid var(--border-light);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.remove-item-btn {
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.remove-item-btn:hover {
  color: #ef4444;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 2001;
}

.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 650px;
  background: var(--white);
  z-index: 2002;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: none;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.modal-visual img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.modal-details {
  display: flex;
  flex-direction: column;
}

.modal-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary-blue);
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 20px;
}

/* Footer */
footer {
  background: var(--white);
  border-t: 1px solid var(--border-light);
  padding: 30px 0;
  margin-top: auto;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-container a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

@media(max-width: 768px) {
  .promo-grid {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 20px;
  }
  .promo-content h1 {
    font-size: 2rem;
  }
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .product-modal {
    padding: 20px;
  }
}
