/* ============================================================
   style.css — ChennaiLaptops Layout & Components
   Uses ONLY variables from theme.css. No hardcoded colors.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg-secondary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; font-weight: 600; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 99px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--bg-nav);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-nav);
  height: 58px;
  display: flex; align-items: center;
}
.navbar-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.navbar-logo-icon {
  width: 32px; height: 32px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 15px; color: var(--text-on-accent);
}
.navbar-logo-text {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 17px; color: var(--text-nav); letter-spacing: -0.3px;
}
.navbar-logo-text span { color: var(--accent-teal); }
.navbar-links {
  display: flex; gap: 6px; align-items: center;
}
.navbar-links a {
  font-size: 14px; color: var(--text-nav-muted);
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.navbar-links a:hover, .navbar-links a.active { color: var(--text-nav); }
.navbar-links a.active { background: rgba(255,255,255,0.06); }
.navbar-right {
  display: flex; align-items: center; gap: 10px;
}
.theme-toggle {
  width: 36px; height: 36px; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background var(--transition);
  color: var(--text-nav);
}
.theme-toggle:hover { background: rgba(255,255,255,0.12); }
.cart-btn {
  position: relative; cursor: pointer;
  width: 36px; height: 36px; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-nav);
  transition: background var(--transition);
  text-decoration: none;
}
.cart-btn:hover { background: rgba(255,255,255,0.12); }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  background: var(--color-danger); color: #fff;
  font-size: 10px; font-weight: 600; min-width: 17px; height: 17px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.hamburger-btn {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--text-nav-muted); border-radius: 2px;
  transition: var(--transition);
}
.mobile-menu {
  display: none; position: absolute; top: 58px; left: 0; right: 0;
  background: var(--bg-nav); border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px 20px 16px; z-index: 999;
}
.mobile-menu a {
  display: block; color: var(--text-nav-muted); font-size: 15px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--bg-hero-solid);
  background: var(--bg-hero);
  padding: 34px 24px 28px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 360px; height: 360px;
  background: var(--accent-hero-glow);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -40px; left: 80px;
  width: 240px; height: 240px;
  background: var(--accent-hero-glow2);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 28px; align-items: center;
}
.hero-content { min-width: 0; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-teal-bg);
  border: 1px solid var(--accent-teal-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px; margin-bottom: 12px;
}
.hero-tag-dot { width: 7px; height: 7px; background: var(--accent-teal); border-radius: 50%; }
.hero-tag-text { font-size: 12px; color: var(--accent-teal); letter-spacing: 0.6px; font-weight: 500; }
.hero-title {
  font-size: clamp(24px, 3.5vw, 38px);
  color: #fff; line-height: 1.15;
  margin-bottom: 10px; letter-spacing: -0.6px;
}
.hero-title .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { font-size: 14px; color: #8888aa; max-width: 440px; margin-bottom: 18px; line-height: 1.55; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-media {
  min-width: 0;
  display: flex; justify-content: flex-end;
  perspective: 1400px;
}
.hero-media-shell {
  position: relative;
  width: min(100%, 460px);
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(124,58,237,0.28), transparent 35%),
    radial-gradient(circle at bottom left, rgba(0,196,154,0.16), transparent 30%),
    rgba(255,255,255,0.03);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  will-change: transform;
  transform:
    translate3d(0, var(--hero-float-y, 0px), 0)
    rotateX(var(--hero-rotate-x, 0deg))
    rotateY(var(--hero-rotate-y, 0deg));
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}
.hero-media-shell::before {
  content: '';
  position: absolute;
  inset: auto 10% -26px 10%;
  height: 30px;
  border-radius: 50%;
  background: rgba(8,10,20,0.5);
  filter: blur(18px);
}
.hero-media-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: rgba(15,15,26,0.7);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.hero-media-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(10, 14, 28, 0.46));
  transform: translate3d(var(--hero-shift-x, 0px), var(--hero-shift-y, 0px), 34px) rotateZ(var(--hero-spin-z, 0deg));
  transition: transform 180ms ease-out;
}
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; white-space: nowrap; }
.btn-primary { background: var(--accent-gradient); color: var(--text-on-accent); }
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,196,154,0.3); }
.btn-secondary { background: var(--accent-gradient-v); color: var(--text-on-accent); }
.btn-secondary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.07); color: #aaa; border: 1px solid rgba(255,255,255,0.12); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-outline-teal { background: var(--accent-teal-bg); color: var(--accent-teal); border: 1px solid var(--accent-teal-border); }
.btn-outline-teal:hover { background: var(--accent-teal); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-full { width: 100%; justify-content: center; }
.hero-stats {
  display: flex; gap: 0; margin-top: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg); overflow: hidden;
  max-width: 350px;
}
.hero-stat {
  flex: 1; padding: 12px 14px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-val { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; color: #fff; }
.hero-stat-lbl { font-size: 10px; color: #555577; margin-top: 2px; letter-spacing: 0.3px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-default);
  padding: 8px 24px;
  position: sticky; top: 58px; z-index: 100;
  box-shadow: var(--shadow-card);
}
.filter-bar-top { border-top: 1px solid var(--border-default); }
.filter-bar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar-inner::-webkit-scrollbar { display: none; }
.filter-label { font-size: 13px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.filter-chip {
  display: inline-flex; align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 4px 12px; font-size: 12px;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
  user-select: none;
}
.filter-chip:hover { border-color: var(--accent-violet); color: var(--accent-violet); }
.filter-chip.active { background: var(--accent-violet-bg); color: var(--accent-violet); border-color: var(--accent-violet-border); font-weight: 500; }

/* ============================================================
   PRODUCTS SECTION
   ============================================================ */
.products-section { max-width: 1200px; margin: 0 auto; padding: 24px 24px 44px; }
.products-section-compact { padding-top: 18px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.section-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.section-count { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.sort-select {
  background: var(--bg-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 7px 12px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.no-results { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 15px; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px);
}
.product-card-compact { min-height: 0; }
.product-card.visible { opacity: 1; transform: translateY(0); transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-hover); }
.card-image {
  height: 132px; position: relative;
  background: linear-gradient(135deg, #0f0f1a, #1a0a2e);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  font-size: 11px; padding: 3px 9px; border-radius: var(--radius-pill);
  font-weight: 500; display: inline-block; border: 1px solid transparent;
}
.badge-brand { background: var(--badge-brand-bg); color: var(--badge-brand-text); border-color: var(--badge-brand-border); }
.badge-excellent { background: var(--badge-excellent-bg); color: var(--badge-excellent-text); border-color: var(--badge-excellent-border); }
.badge-good { background: var(--badge-good-bg); color: var(--badge-good-text); border-color: var(--badge-good-border); }
.badge-fair { background: var(--badge-fair-bg); color: var(--badge-fair-text); border-color: var(--badge-fair-border); }
.badge-instock { background: var(--badge-instock-bg); color: var(--badge-instock-text); }
.badge-outstock { background: var(--badge-outstock-bg); color: var(--badge-outstock-text); }
.badge-lowstock { background: var(--badge-lowstock-bg); color: var(--badge-lowstock-text); }
.card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.card-name {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.25;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.card-specs { display: none; }
.spec-pill { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: 4px; padding: 2px 7px; font-size: 11px; color: var(--text-secondary); }
.card-rating-row { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; min-height: 18px; }
.card-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.price-current { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.price-original, .price-save { display: none; }
.card-stars { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.stars { color: var(--star-filled); font-size: 12px; letter-spacing: 0.5px; }
.stars-empty { color: var(--star-empty); }
.review-count { font-size: 11px; color: var(--text-muted); }
.card-footer { display: flex; gap: 6px; margin-top: auto; }
.card-footer .btn { flex: 1; font-size: 12px; padding: 8px 10px; }
.card-cart-form { display: flex; flex: 1; }
.btn-wish { background: var(--bg-secondary); border: 1px solid var(--border-default); color: var(--text-secondary); width: 38px; flex: 0 0 38px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; }
.btn-cart-compact { width: 100%; flex: 1; font-size: 12px; padding: 8px 10px; }
.btn-wish:hover, .btn-wish.active { border-color: var(--color-danger); color: var(--color-danger); }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.detail-page { max-width: 1200px; margin: 0 auto; padding: 30px 24px 60px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--accent-teal); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-muted); margin: 0 6px; }
.detail-grid { display: grid; grid-template-columns: 420px 1fr; gap: 40px; }
.main-image {
  background: linear-gradient(135deg, #0f0f1a, #1a0a2e);
  border-radius: var(--radius-lg); border: 1px solid var(--border-default);
  height: 300px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; overflow: hidden; position: relative;
}
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.image-thumbs { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.thumb-btn {
  background: var(--bg-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); height: 64px; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted); transition: border-color 0.2s;
}
.thumb-btn.active, .thumb-btn:hover { border-color: var(--accent-violet); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.thumb-note {
  background: var(--bg-card);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.includes-box {
  background: var(--accent-teal-bg); border: 1px solid var(--accent-teal-border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-top: 14px;
}
.includes-title { font-size: 12px; color: var(--accent-teal); font-weight: 600; margin-bottom: 8px; }
.includes-items { font-size: 13px; color: var(--text-secondary); line-height: 2; }
.detail-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-name { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; letter-spacing: -0.5px; line-height: 1.2; }
.detail-rating-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.detail-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.detail-price { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 700; color: var(--text-primary); }
.detail-original { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.detail-save { background: var(--accent-teal-bg); color: var(--accent-teal); border: 1px solid var(--accent-teal-border); padding: 3px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.stock-alert {
  background: var(--color-warning-bg); border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-sm); padding: 9px 14px;
  font-size: 13px; color: var(--color-warning);
  display: flex; align-items: center; gap: 7px; margin-bottom: 16px;
}
.outofstock-alert {
  background: var(--color-danger-bg); border: 1px solid var(--color-danger-border);
  border-radius: var(--radius-sm); padding: 9px 14px;
  font-size: 13px; color: var(--color-danger);
  margin-bottom: 16px;
}
.specs-table { border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px; }
.spec-row { display: grid; grid-template-columns: 130px 1fr; }
.spec-row + .spec-row { border-top: 1px solid var(--border-default); }
.spec-key { background: var(--bg-secondary); padding: 10px 14px; font-size: 13px; color: var(--text-secondary); }
.spec-val { background: var(--bg-card); padding: 10px 14px; font-size: 13px; color: var(--text-primary); font-weight: 500; }
.detail-actions { display: flex; gap: 10px; }
.qty-input-wrap { display: flex; align-items: center; border: 1px solid var(--border-default); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 36px; height: 44px; background: var(--bg-secondary); border: none; cursor: pointer; font-size: 18px; color: var(--text-secondary); transition: background 0.15s; }
.qty-btn:hover { background: var(--border-default); }
.qty-num { width: 40px; text-align: center; font-size: 15px; font-weight: 600; color: var(--text-primary); background: var(--bg-card); border: none; outline: none; }

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews-section { margin-top: 48px; border-top: 1px solid var(--border-default); padding-top: 36px; }
.reviews-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.reviews-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; }
.reviews-summary { display: flex; gap: 24px; align-items: center; background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px; }
.avg-rating-big { font-family: 'Syne', sans-serif; font-size: 52px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.avg-stars { color: var(--star-filled); font-size: 16px; letter-spacing: 2px; margin: 4px 0; }
.avg-count { font-size: 13px; color: var(--text-muted); }
.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.rbar-row { display: flex; align-items: center; gap: 8px; }
.rbar-label { font-size: 12px; color: var(--text-secondary); min-width: 22px; }
.rbar-track { flex: 1; height: 6px; background: var(--border-default); border-radius: 99px; overflow: hidden; }
.rbar-fill { height: 100%; background: linear-gradient(90deg, var(--star-filled), var(--accent-coral)); border-radius: 99px; }
.rbar-count { font-size: 12px; color: var(--text-muted); min-width: 22px; }
.review-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.review-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 16px; }
.review-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.reviewer-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.reviewer-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.review-stars { color: var(--star-filled); font-size: 14px; letter-spacing: 1px; }
.review-text { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.add-review-box { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 22px; }
.add-review-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-input, .form-textarea, .form-select {
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 14px; color: var(--text-primary); width: 100%;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--accent-violet); }
.form-textarea { resize: vertical; min-height: 90px; }
.star-picker { display: flex; gap: 6px; }
.star-picker-btn { font-size: 24px; cursor: pointer; color: var(--star-empty); transition: color 0.15s, transform 0.1s; background: none; border: none; padding: 0; line-height: 1; }
.star-picker-btn.active, .star-picker-btn:hover { color: var(--star-filled); transform: scale(1.15); }
.form-message { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 10px; }
.form-message.success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); }
.form-message.error { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid var(--color-danger-border); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-nav); margin-top: 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 36px 24px 28px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-logo-text { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-logo-text span { color: var(--accent-teal); }
.footer-tagline { font-size: 13px; color: #555577; line-height: 1.6; }
.footer-col h4 { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 600; color: #999; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: #666688; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: #aaaacc; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-size: 12px; color: #444466; }

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: none; }
.cart-overlay.open { display: block; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 420px; height: 100%;
  background: var(--bg-primary); z-index: 2001;
  box-shadow: -4px 0 30px rgba(0,0,0,0.2);
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.cart-drawer.open { right: 0; }
.cart-drawer-header { padding: 20px; border-bottom: 1px solid var(--border-default); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.cart-drawer-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-secondary); line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.cart-item { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 12px; display: flex; gap: 12px; align-items: center; }
.cart-item-img { width: 60px; height: 50px; background: linear-gradient(135deg,#0f0f1a,#1a0a2e); border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--accent-teal); overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
.cart-item-price { font-size: 14px; color: var(--accent-teal); font-weight: 600; }
.cart-item-remove { background: none; border: none; font-size: 18px; color: var(--text-muted); cursor: pointer; padding: 4px; }
.cart-item-remove:hover { color: var(--color-danger); }
.cart-footer { padding: 16px; border-top: 1px solid var(--border-default); flex-shrink: 0; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-total-label { font-size: 15px; color: var(--text-secondary); }
.cart-total-val { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; }

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-page { max-width: 1200px; }
.cart-page-title { margin-bottom: 24px; }
.cart-empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
}
.cart-empty-icon { font-size: 48px; margin-bottom: 16px; }
.cart-empty-title { margin-bottom: 10px; color: var(--text-primary); }
.cart-empty-copy { margin-bottom: 20px; }
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.cart-items-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.cart-item-image {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0f0f1a, #1a0a2e);
}
.cart-item-main { min-width: 0; }
.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.cart-item-meta { font-size: 13px; color: var(--text-muted); }
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cart-item-total {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-align: right;
}
.cart-qty-form { display: flex; align-items: center; gap: 6px; }
.cart-remove-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 12px;
  cursor: pointer;
}
.cart-clear-row { text-align: right; }
.cart-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
.cart-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.cart-summary-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.cart-summary-total-row {
  border-top: 1px solid var(--border-default);
  padding-top: 12px;
  margin-top: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cart-summary-total-label { font-size: 15px; color: var(--text-secondary); }
.cart-summary-total-value {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
}
.cart-summary-note {
  background: var(--accent-teal-bg);
  border: 1px solid var(--accent-teal-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--accent-teal);
  margin-bottom: 14px;
}
.cart-summary-copy {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page { max-width: 900px; }
.contact-page-title {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.contact-page-copy {
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.contact-success-card {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.contact-success-icon { font-size: 36px; margin-bottom: 12px; }
.contact-success-title { color: var(--color-success); margin-bottom: 8px; }
.contact-success-copy { color: var(--text-secondary); font-size: 14px; }
.contact-info-column { display: flex; flex-direction: column; gap: 14px; }
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.contact-info-icon { font-size: 18px; margin-top: 1px; }
.contact-info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.contact-info-value { font-size: 14px; font-weight: 500; color: var(--text-primary); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.about-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.about-feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.about-feature-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.about-cta-btn {
  min-width: 0;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash { padding: 12px 20px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.flash.success { background: var(--color-success-bg); color: var(--color-success); border-left: 3px solid var(--color-success); }
.flash.error { background: var(--color-danger-bg); color: var(--color-danger); border-left: 3px solid var(--color-danger); }
.flash-bar { max-width: 1200px; margin: 14px auto; border-radius: var(--radius-md); overflow: hidden; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 12px 18px; font-size: 13px; color: var(--text-primary); box-shadow: var(--shadow-hover); display: flex; align-items: center; gap: 10px; animation: slideInToast 0.3s ease; min-width: 220px; max-width: 320px; }
.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-danger); }
@keyframes slideInToast { from { opacity:0; transform:translateY(12px);} to { opacity:1; transform:translateY(0);} }

/* ============================================================
   CHAT ASSISTANT
   ============================================================ */
.assistant-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.assistant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
  font-weight: 600;
}
.assistant-toggle-icon { font-size: 16px; }
.assistant-panel {
  width: min(380px, calc(100vw - 24px));
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  display: none;
}
.assistant-panel.open { display: block; }
.assistant-header {
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
}
.assistant-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; }
.assistant-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.assistant-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
}
.assistant-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}
.assistant-message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.assistant-message.assistant {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
}
.assistant-message.user {
  align-self: flex-end;
  background: var(--accent-violet-bg);
  color: var(--text-primary);
  border: 1px solid var(--accent-violet-border);
}
.assistant-message.pending {
  opacity: 0.7;
  font-style: italic;
}

.assistant-thinking-label {
  display: inline-block;
  margin-right: 8px;
}

.assistant-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.assistant-thinking-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: assistantTypingDot 1.1s infinite ease-in-out;
}

.assistant-thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.assistant-thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes assistantTypingDot {
  0%, 80%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 0.95;
    transform: translateY(-3px);
  }
}
.assistant-suggestions {
  padding: 0 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.assistant-chip {
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.assistant-form {
  display: flex;
  gap: 8px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border-default);
}
.assistant-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text-primary);
}
.assistant-send {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  font-weight: 600;
}

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.fade-in-up { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 22px; }
  .hero-content { order: 1; }
  .hero-media { order: 2; justify-content: center; }
  .hero-media-shell { width: min(100%, 520px); }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary-card {
    position: static;
    top: auto;
  }
  .contact-layout { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

@media (max-width: 640px) {
  .navbar { height: 64px; }
  .navbar-inner { padding: 0 16px; gap: 12px; }
  .navbar-logo-text { font-size: 15px; }
  .navbar-right { gap: 6px; }
  .navbar-links { display: none; }
  .hamburger-btn { display: flex; }
  .mobile-menu { top: 64px; }
  .hero { padding: 22px 16px 20px; }
  .hero-title { font-size: clamp(24px, 9vw, 34px); }
  .hero-subtitle { font-size: 15px; max-width: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats { max-width: 100%; }
  .hero-stat { padding: 14px 10px; }
  .hero-stat-val { font-size: 18px; }
  .hero-stat-lbl { font-size: 10px; }
  .hero-media-shell { padding: 10px; border-radius: 24px; }
  .hero-media-shell {
    --hero-rotate-x: 0deg !important;
    --hero-rotate-y: 0deg !important;
    --hero-shift-x: 0px !important;
    --hero-shift-y: 0px !important;
  }
  .hero-media-badge { top: 10px; left: 10px; font-size: 11px; padding: 6px 10px; }
  .products-section { padding: 18px 16px 34px; }
  .filter-bar { padding: 10px 16px; }
  .filter-bar { top: 64px; }
  .section-header { align-items: stretch; }
  .section-header form { width: 100%; flex-wrap: nowrap; }
  .section-header .form-input { min-width: 0; flex: 1; }
  .sort-select { min-width: 148px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-image { height: 112px; }
  .card-footer { flex-wrap: wrap; }
  .card-footer .btn { min-height: 38px; }
  .btn-wish { flex: 0 0 38px; width: 38px; }
  .cart-page-title { margin-bottom: 18px; }
  .cart-empty-state { padding: 40px 18px; }
  .cart-item-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .cart-item-image {
    width: 100%;
    max-width: 170px;
    height: 118px;
  }
  .cart-item-main,
  .cart-item-actions { width: 100%; }
  .cart-item-actions {
    align-items: stretch;
  }
  .cart-item-total { text-align: left; }
  .cart-qty-form { justify-content: flex-start; }
  .cart-remove-btn { align-self: flex-start; }
  .cart-clear-row { text-align: left; }
  .cart-summary-card { padding: 18px 16px; }
  .cart-summary-row {
    font-size: 12px;
    flex-wrap: wrap;
  }
  .contact-page-title { font-size: 26px; }
  .contact-page-copy { margin-bottom: 22px; }
  .contact-form-card,
  .contact-success-card { padding: 18px; }
  .contact-info-card { padding: 13px 14px; }
  .assistant-widget {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }
  .assistant-toggle { justify-content: center; }
  .assistant-panel { width: 100%; }
  .footer-top { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; right: -100%; }
  .form-row { grid-template-columns: 1fr; }
  .reviews-summary { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 28px; }
  .hero-tag-text { font-size: 11px; }
  .section-header form { flex-wrap: wrap; }
  .sort-select { width: 100%; }
  .products-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.navbar-auth-link {
  font-size: 14px;
  font-weight: 600;
}

.navbar-auth-link-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
}

.auth-shell {
  min-height: calc(100vh - 180px);
  padding: 40px 20px 64px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.96));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  padding: 30px;
}

[data-theme="dark"] .auth-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(22, 32, 49, 0.96));
  border-color: rgba(148, 163, 184, 0.18);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-title {
  margin: 18px 0 8px;
  font-family: 'Syne', sans-serif;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1;
}

.auth-copy {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .form-row {
  display: grid;
  gap: 14px;
}

.auth-form .btn {
  justify-content: center;
}

.auth-alt {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-alt a {
  color: var(--text-primary);
  font-weight: 700;
}

.auth-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   GLOBAL LOADER
   ============================================================ */
.site-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.18), transparent 38%),
    rgba(244, 247, 251, 0.88);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 3000;
}

[data-theme="dark"] .site-loader {
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 38%),
    rgba(2, 6, 23, 0.8);
}

.site-loader.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-loader-inner {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.site-loader-spinner {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid rgba(37, 99, 235, 0.14);
  border-top-color: #2563eb;
  border-right-color: #0f766e;
  animation: siteLoaderSpin 0.9s linear infinite;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.38);
}

.site-loader-label {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.site-loader-copy {
  font-size: 14px;
  color: var(--text-secondary);
}

@keyframes siteLoaderSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================================
   FULLSCREEN ASSISTANT
   ============================================================ */
.assistant-widget {
  right: 24px;
  bottom: 24px;
}

.assistant-toggle {
  min-height: 54px;
  padding: 14px 18px;
}

.assistant-panel {
  position: fixed;
  inset: 18px;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  border-radius: 28px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
  z-index: 2500;
}

[data-theme="dark"] .assistant-panel {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98));
}

.assistant-panel.open {
  display: grid;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.assistant-header {
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(37, 99, 235, 0.08));
}

.assistant-body {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
}

.assistant-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.assistant-title {
  font-size: 24px;
}

.assistant-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.assistant-language {
  min-width: 180px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 10px 12px;
}

.assistant-language-wrap {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.assistant-clear {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
}

.assistant-clear:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.assistant-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
}

.assistant-messages {
  max-height: none;
  min-height: 0;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.06), transparent 32%);
}

.assistant-message {
  max-width: min(820px, 92%);
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 14px;
}

.assistant-suggestions {
  padding: 0 22px 16px;
}

.assistant-chip {
  padding: 8px 12px;
}

.assistant-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
}

.assistant-product-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.assistant-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
}

.assistant-product-media {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.assistant-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assistant-product-body {
  display: grid;
  gap: 6px;
  align-content: center;
}

.assistant-product-name {
  font-weight: 700;
  color: var(--text-primary);
}

.assistant-product-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.assistant-product-price {
  font-size: 15px;
  font-weight: 700;
  color: #0f766e;
}

.assistant-guest {
  display: grid;
  gap: 16px;
  align-content: center;
  justify-items: start;
  padding: 28px 22px 26px;
}

.assistant-guest p {
  margin: 0;
  max-width: 620px;
  color: var(--text-secondary);
}

.assistant-guest-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
}

.assistant-guest-copy {
  font-size: 15px;
}

.assistant-guest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-form {
  padding: 18px 22px 22px;
  background: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .assistant-form {
  background: rgba(2, 6, 23, 0.34);
}

.assistant-input {
  min-height: 48px;
}

.assistant-send {
  min-width: 120px;
}

@media (max-width: 900px) {
  .auth-card {
    padding: 24px;
  }

  .assistant-panel {
    inset: 12px;
    border-radius: 22px;
  }

  .assistant-header,
  .assistant-messages,
  .assistant-form,
  .assistant-suggestions,
  .assistant-guest {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 26px 16px 46px;
  }

  .auth-card {
    border-radius: 22px;
    padding: 20px;
  }

  .auth-form .form-row {
    grid-template-columns: 1fr;
  }

  .site-loader-label {
    font-size: 20px;
  }

  .assistant-widget {
    right: 14px;
    left: 14px;
    bottom: 14px;
  }

  .assistant-toggle {
    justify-content: center;
  }

  .assistant-panel {
    inset: 0;
    border-radius: 0;
  }

  .assistant-header-main {
    align-items: flex-start;
  }

  .assistant-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .assistant-language,
  .assistant-send {
    width: 100%;
  }

  .assistant-message {
    max-width: 100%;
  }

  .assistant-product-card {
    grid-template-columns: 72px 1fr;
  }

  .assistant-product-media {
    width: 72px;
    height: 72px;
  }

  .assistant-form {
    flex-direction: column;
  }
}

/* ============================================================
   LAYOUT STABILITY OVERRIDES
   ============================================================ */
body {
  overflow-x: hidden;
}

.navbar,
.mobile-menu,
.filter-bar,
.hero,
.products-section,
.detail-page,
.cart-page,
.contact-page,
.footer,
.assistant-widget,
.assistant-panel,
.site-loader,
.toast-container {
  max-width: 100vw;
}

.navbar-right > * {
  flex-shrink: 0;
}

.navbar-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.filter-bar-inner,
.section-header > div,
.detail-images,
.detail-info,
.cart-items-list,
.contact-layout > div,
.assistant-body,
.assistant-messages {
  min-width: 0;
}

.section-header {
  align-items: flex-start;
}

.section-header [data-catalog-form] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 360px;
  max-width: 100%;
}

.section-header [data-catalog-form] .form-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
}

.section-header [data-catalog-form] .sort-select {
  flex: 0 0 170px;
  max-width: 100%;
}

.detail-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
}

.detail-actions {
  flex-wrap: wrap;
  align-items: stretch;
}

.detail-actions .btn {
  justify-content: center;
}

.detail-actions .btn-secondary {
  flex: 1 1 220px;
}

.qty-input-wrap {
  flex: 0 0 auto;
}

.reviews-header,
.reviews-summary {
  gap: 16px;
}

.contact-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}

.assistant-widget {
  max-width: calc(100vw - 28px);
}

.assistant-panel {
  overflow: hidden;
}

.assistant-header {
  display: block;
}

.assistant-toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
}

.assistant-language-wrap {
  flex: 1 1 220px;
}

.assistant-clear {
  flex: 0 0 auto;
}

.assistant-messages {
  overflow: auto;
}

@media (max-width: 900px) {
  .navbar-right .navbar-auth-link {
    display: none;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-header [data-catalog-form] {
    width: 100%;
    flex: 1 1 auto;
    flex-wrap: wrap;
  }

  .section-header [data-catalog-form] .form-input,
  .section-header [data-catalog-form] .sort-select {
    flex: 1 1 200px;
    width: 100% !important;
  }

  .detail-page {
    padding: 24px 20px 48px;
  }

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

  .main-image {
    height: min(64vw, 320px);
  }

  .image-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-actions .btn-secondary,
  .detail-actions .qty-input-wrap {
    width: 100%;
  }

  .qty-input-wrap {
    justify-content: center;
  }

  .reviews-header,
  .reviews-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary-card {
    position: static;
    top: auto;
  }

  .assistant-panel {
    inset: 10px;
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 84px;
  }

  .navbar {
    min-height: 64px;
    height: auto;
  }

  .navbar-inner {
    width: 100%;
    max-width: 100%;
    min-height: 64px;
    padding: 12px 16px;
    gap: 8px;
  }

  .navbar-logo {
    min-width: 0;
    flex: 1 1 auto;
  }

  .navbar-logo-text {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar-right {
    min-width: 0;
    margin-left: auto;
  }

  .theme-toggle {
    display: none;
  }

  .filter-bar {
    top: 64px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .products-section,
  .cart-page,
  .contact-page,
  .detail-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-feature-grid {
    gap: 10px;
    margin-bottom: 20px;
  }

  .about-feature-card {
    padding: 12px 8px;
    border-radius: 14px;
  }

  .about-feature-title {
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 6px;
  }

  .about-feature-copy {
    font-size: 11px;
    line-height: 1.35;
  }

  .about-cta-btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .card-body {
    padding: 10px;
  }

  .card-footer {
    flex-wrap: wrap;
  }

  .detail-name {
    font-size: 24px;
  }

  .spec-row {
    grid-template-columns: 1fr;
  }

  .cart-item-card {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }

  .cart-item-total,
  .cart-clear-row {
    text-align: left;
  }

  .contact-form-card,
  .contact-success-card,
  .cart-summary-card,
  .auth-card {
    width: 100%;
    padding: 18px;
  }

  .assistant-widget {
    left: auto;
    right: 14px;
    bottom: 14px;
    width: auto;
    max-width: none;
    z-index: 2600;
  }

  .assistant-widget.is-open {
    inset: 0;
  }

  .assistant-panel {
    inset: 0;
    border-radius: 0;
    background: rgba(248, 250, 252, 0.985);
    z-index: 2601;
  }

  [data-theme="dark"] .assistant-panel {
    background: rgba(8, 15, 28, 0.992);
  }

  .assistant-widget.is-open .assistant-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
  }

  .assistant-header,
  .assistant-messages,
  .assistant-suggestions,
  .assistant-form,
  .assistant-guest {
    padding-left: 16px;
    padding-right: 16px;

  .assistant-header {
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .assistant-title {
    font-size: 18px;
    line-height: 1.15;
  }

  .assistant-subtitle {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
  }

  .assistant-toolbar {
    gap: 8px;
  }

  .assistant-language {
    min-width: 0;
    width: 100%;
  }

  .assistant-clear,
  .assistant-send {
    min-height: 48px;
  }

  .assistant-toggle {
    width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  }

  .assistant-toggle span:last-child {
    display: none;
  }

  .assistant-toggle-icon {
    font-size: 20px;
  }

  .assistant-suggestions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .assistant-suggestions::-webkit-scrollbar {
    display: none;
  }

  .assistant-chip {
    flex: 0 0 auto;
  }

  .assistant-messages {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  }

  .assistant-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .assistant-header,
  .assistant-messages,
  .assistant-suggestions,
  .assistant-form,
  .assistant-guest {
    padding-left: 14px;
    padding-right: 14px;
  }

  .assistant-language-wrap,
  .assistant-clear,
  .assistant-send {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .about-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .about-feature-card {
    padding: 10px 6px;
  }

  .about-feature-title {
    font-size: 11px;
  }

  .about-feature-copy {
    font-size: 10px;
  }

  .about-cta-btn {
    width: auto;
    max-width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    max-width: 100%;
  }

  .hero-stat {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .hero-stat:last-child {
    border-bottom: none;
  }
}
