:root {
  --bg: #080c10;
  --surface: #121820;
  --surface2: #1a2330;
  --surface3: #222d3d;
  --border: #2a3545;
  --text: #f2f6fa;
  --muted: #8fa3b8;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --warn: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 16, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand:hover { text-decoration: none; color: inherit; }

.brand-text {
  min-width: 0;
  line-height: 1.2;
}

.brand-logo {
  display: none;
}

.brand-logo.has-image {
  width: auto;
  min-width: 0;
  max-width: 80px;
  height: 26px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* Texniki fasilə (maintenance) overlay */
.maint-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.maint-overlay[hidden] { display: none; }
.maint-box {
  max-width: 480px;
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 40px 28px;
  color: #f1f5f9;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.maint-icon { font-size: 3.2rem; line-height: 1; margin-bottom: 12px; }
.maint-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.maint-msg { font-size: 1rem; line-height: 1.6; color: #cbd5e1; margin-bottom: 24px; }
.maint-langs { display: flex; gap: 8px; justify-content: center; }
.maint-langs .lang-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #e2e8f0;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.maint-langs .lang-btn:hover { background: rgba(255, 255, 255, 0.1); }
.maint-langs .lang-btn.active {
  background: var(--accent, #22c55e);
  border-color: transparent;
  color: #fff;
}

.brand-logo-img {
  display: block;
  max-height: 22px;
  max-width: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.brand h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1px;
  line-height: 1.2;
}

.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s;
}

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: #052e16; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); }

.btn-icon { position: relative; padding: 10px 16px; }

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
}
.lang-switch button.active {
  background: var(--accent);
  color: #052e16;
  border-color: var(--accent);
}

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 70% 80% at 80% 20%, rgba(34, 197, 94, 0.08), transparent),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(59, 130, 246, 0.06), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 56px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.hero-text h2 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-text p { color: var(--muted); font-size: 1.02rem; max-width: 480px; }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  align-items: center;
}

.hero-phone { font-weight: 500; }

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.hero-card span { font-size: 1.6rem; }
.hero-card strong { font-size: 0.88rem; font-weight: 600; }
.hero-card:nth-child(1) { grid-column: 1 / -1; }
.hero-card.delay { animation-delay: 0.5s; }
.hero-card.delay2 { animation-delay: 1s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 12px;
  padding: 28px 0 8px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
  pointer-events: none;
}

.search-box {
  width: 100%;
  padding: 13px 16px 13px 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.search-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.category-select {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-width: 160px;
  font-family: inherit;
  font-size: 0.92rem;
}

.sort-select { min-width: 180px; }

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: center;
  padding: 20px 0 8px;
  margin-top: -8px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.trust-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.footer-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.social-link {
  color: var(--accent);
  font-size: 0.88rem;
  text-decoration: none;
}

.social-link:hover { text-decoration: underline; }

.recent-row { margin-top: 4px; }

.results-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 56px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(34, 197, 94, 0.25);
}

.product-img-wrap {
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover .product-img-wrap img { transform: scale(1.04); }

.product-img-wrap .placeholder {
  font-size: 3rem;
  opacity: 0.2;
}

/* Məhsul şəkil qalereyası (miniatürlər) */
.product-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 8px 0;
  flex-wrap: wrap;
}

.product-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface2);
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb:hover { transform: translateY(-2px); }
.product-thumb.active { border-color: var(--accent); }

.product-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-cat {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.product-name {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stock-badge {
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-block;
  width: fit-content;
  font-weight: 600;
}

.stock-ok { background: var(--accent-soft); color: var(--accent); }
.stock-no { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.product-card .btn { margin-top: auto; width: 100%; }

/* Aksiya / endirim */
.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--danger);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
.sale-badge.pd-sale { position: static; display: inline-block; vertical-align: middle; }

.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.85em;
  font-weight: 500;
  margin-left: 6px;
}
.price-now { color: var(--danger); }

/* Seçilmiş bölmələr: Aksiya & Ən çox satılan */
.featured-row { margin: 8px 0 26px; }
.featured-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.featured-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.featured-scroll::-webkit-scrollbar { height: 6px; }
.featured-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.mini-card {
  flex: 0 0 160px;
  width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.2s, border-color 0.2s;
}
.mini-card:hover { transform: translateY(-3px); border-color: rgba(34, 197, 94, 0.3); }
.mini-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mini-img img { width: 100%; height: 100%; object-fit: cover; }
.mini-ph { font-size: 2rem; opacity: 0.2; }
.mini-body { padding: 10px 12px; }
.mini-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.mini-price { font-size: 0.95rem; font-weight: 800; color: var(--accent); }
.mini-price .price-now { color: var(--danger); }

/* Skeleton */
.skeleton-grid {
  display: contents;
}

.skeleton-card {
  aspect-ratio: 0.75;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-state, .empty-state {
  text-align: center;
  padding: 72px 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.empty-state h3 { color: var(--text); margin-bottom: 8px; font-size: 1.15rem; }

.alert-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-top: 20px;
  font-size: 0.88rem;
}

/* Cart */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}

.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
}

.cart-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.cart-header-left > div:last-child {
  min-width: 0;
}

.cart-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-header-icon svg { width: 22px; height: 22px; }

.cart-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.cart-item-count {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.3;
}

.cart-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  transition: 0.15s;
}

.cart-close-btn:hover { color: var(--text); border-color: var(--accent); }

.cart-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 16px;
  scrollbar-width: thin;
}

.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.cart-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.cart-line {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}

.cart-line:last-child { margin-bottom: 0; }

.cart-line:hover { border-color: rgba(34, 197, 94, 0.35); }

.cart-line-thumb {
  grid-row: 1 / -1;
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
}

.cart-line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-thumb-ph { font-size: 1.6rem; opacity: 0.5; }

.cart-line-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cart-line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-line-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cart-line-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 6px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -2px;
}

.cart-line-remove:hover { color: var(--danger, #ef4444); background: rgba(239, 68, 68, 0.1); }

.cart-line-unit {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.35;
}

.cart-line-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.cart-qty {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  height: 34px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qty-btn:hover { background: var(--surface); }

.qty-val {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-line-sub {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 34px;
}

.cart-footer {
  flex: 0 0 auto;
  max-height: min(58dvh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

.cart-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-row span:first-child,
.cart-total span:first-child {
  flex: 1;
  min-width: 0;
}

.summary-row span:last-child,
.cart-total span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.checkout-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 4px;
}

.checkout-form input,
.checkout-form textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.checkout-form textarea { min-height: 68px; resize: vertical; }

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 14px;
  font-weight: 700;
  width: 100%;
}

.btn-checkout svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-checkout-text {
  flex: 1;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  z-index: 300;
  opacity: 0;
  transition: 0.3s;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  max-width: min(90vw, 400px);
  text-align: center;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.ok { border-color: rgba(34, 197, 94, 0.45); }
.toast.err { border-color: rgba(239, 68, 68, 0.45); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 20px;
  background: var(--surface);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.footer-inner strong { font-size: 1rem; }
.footer-inner p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  font-size: 0.88rem;
}

.footer-address { color: var(--muted); }

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .header-inner { flex-direction: column; align-items: stretch; }
  .nav-links { justify-content: space-between; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { text-align: left; }
}

@media (max-width: 480px) {
  .lang-switch { order: -1; width: 100%; justify-content: center; }

  .cart-drawer { width: 100vw; }

  .cart-line {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 10px;
  }

  .cart-line-thumb {
    width: 56px;
    height: 56px;
  }

  .cart-line-name { font-size: 0.88rem; }

  .cart-line-foot {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .cart-line-sub {
    margin-left: auto;
  }

  .cart-footer {
    padding: 14px 16px 18px;
    max-height: min(62dvh, 520px);
  }
}

.hidden { display: none !important; }

.nav-svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-account.logged-in { border-color: var(--accent); color: var(--accent); }

/* Checkout auth gate */
.checkout-auth-gate {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.gate-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.gate-icon svg { width: 26px; height: 26px; }
.checkout-auth-gate p { color: var(--muted); font-size: 0.88rem; margin-bottom: 14px; }

.checkout-user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.checkout-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.checkout-user-bar #checkoutUserEmail {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-sm {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

/* Auth modal */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}

.auth-overlay.open { opacity: 1; visibility: visible; }

.auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 401;
  width: min(420px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}

.auth-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}

.auth-modal-head { text-align: center; margin-bottom: 22px; }

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
}

.auth-logo svg { width: 100%; height: 100%; }

.auth-modal-head h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; }
.auth-modal-head p { color: var(--muted); font-size: 0.88rem; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 20px;
}

.auth-tab {
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}

.auth-tab.active {
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.auth-field {
  position: relative;
}

.auth-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.auth-field input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1em;
  text-align: center;
}

.auth-error.auth-info {
  color: var(--text);
  line-height: 1.45;
}

.btn-resend-confirm {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-resend-confirm.hidden { display: none !important; }

.btn-orders.hidden { display: none !important; }

.orders-drawer { max-width: 440px; }

.orders-header-icon {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.orders-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
}

.orders-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.orders-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.order-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.order-card-num {
  font-weight: 800;
  font-size: 0.95rem;
}

.order-card-date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.order-card-total {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.order-status-badge.st-new { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.order-status-badge.st-accepted { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.order-status-badge.st-shipped { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.order-status-badge.st-completed { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.order-status-badge.st-cancelled { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.order-status-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -6px 0 12px;
}

.order-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.order-track-step {
  text-align: center;
  position: relative;
}

.order-track-step::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.order-track-step:last-child::after { display: none; }

.order-track-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface3);
  border: 2px solid var(--border);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  position: relative;
  z-index: 1;
}

.order-track-step.done .order-track-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.order-track-step.active .order-track-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.order-track-step.done::after { background: var(--accent); }

.order-track-label {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.2;
}

.order-track-step.done .order-track-label,
.order-track-step.active .order-track-label {
  color: var(--text);
  font-weight: 600;
}

.order-items-mini {
  margin: 0;
  padding-left: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}

.order-items-mini li { margin-bottom: 3px; }

.order-card-addr {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.order-card-addr strong {
  color: var(--text);
  font-weight: 600;
}

/* Hesab paneli */
.account-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.account-header-icon {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

#accountForm .field-label { margin: 8px 0 4px; }
#accountForm input {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
#accountForm input:focus { outline: none; border-color: var(--accent); }
#accountForm .btn { margin-top: 16px; }
#accountMsg { margin-top: 8px; min-height: 18px; }

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.account-logout { color: var(--danger); }

/* Məhsul detal pəncərəsi */
.pd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: 420;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}
.pd-overlay.open { opacity: 1; visibility: visible; }

.pd-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 421;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}
.pd-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.pd-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 12, 16, 0.6);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
}
.pd-close:hover { background: var(--surface3); }

.pd-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
}

.pd-gallery { padding: 22px; }

.pd-main {
  aspect-ratio: 1;
  background: var(--surface2);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-main-img { width: 100%; height: 100%; object-fit: contain; }
.pd-noimg { font-size: 4rem; opacity: 0.2; }

.pd-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pd-info {
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--border);
}

.pd-name { font-size: 1.5rem; font-weight: 800; line-height: 1.25; }
.pd-price { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.pd-info .stock-badge { align-self: flex-start; }
.pd-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
/* AI bölməsi */
.pd-ai { margin: 4px 0; }
.btn-ai {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  border: none;
}
.btn-ai:hover { filter: brightness(1.08); }
.btn-ai:disabled { opacity: 0.7; cursor: progress; }

.pd-ai-result {
  margin-top: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.pd-ai-result.hidden { display: none; }
.pd-ai-title { font-weight: 800; margin-bottom: 8px; font-size: 0.95rem; }
.pd-ai-text { font-size: 0.9rem; line-height: 1.65; color: var(--text); }
.pd-ai-loading { color: var(--muted); font-size: 0.9rem; }
.pd-ai-err { color: var(--danger); font-size: 0.88rem; }
.ai-dots::after {
  content: "•••";
  letter-spacing: 2px;
  animation: aiBlink 1.2s infinite;
}
@keyframes aiBlink { 0%,100%{opacity:0.3} 50%{opacity:1} }

.pd-actions { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 14px; }

.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pd-qty-label { font-weight: 600; color: var(--muted); }
.pd-qty .qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pd-extra {
  border-top: 1px solid var(--border);
  padding: 22px 26px 26px;
}

.pd-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 14px;
}

.pd-similar { margin-bottom: 24px; }
.pd-similar.hidden { display: none; }

.pd-reviews-wrap { margin-top: 8px; }

.pd-reviews-summary {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.reviews-avg {
  color: #f59e0b;
  letter-spacing: 1px;
  margin-right: 8px;
}

.reviews-count { color: var(--text); }

.pd-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.review-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.review-stars { color: #f59e0b; letter-spacing: 1px; font-size: 0.9rem; }

.review-text {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.pd-review-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.pd-review-form-title {
  font-weight: 700;
  margin: 0 0 4px;
}

.pd-review-form input,
.pd-review-form textarea,
.pd-review-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

.review-stars-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-stars-input label { font-size: 0.88rem; color: var(--muted); }

.review-form-msg {
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0;
}

.pd-main { position: relative; cursor: zoom-in; }
.pd-zoom-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(8, 12, 16, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Tam ekran şəkil */
.pd-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  cursor: zoom-out;
}
.pd-lightbox.open { opacity: 1; visibility: visible; }
.pd-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.pd-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.pd-lightbox-close:hover { background: rgba(0, 0, 0, 0.8); }

/* Qiymət soruş */
.btn-price-ask {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
}
.btn-price-ask:hover { filter: brightness(1.05); }

.pi-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10050;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}
.pi-overlay.open { opacity: 1; visibility: visible; }

.pi-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 10060;
  width: min(92vw, 380px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 20px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}
.pi-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.pi-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--surface2);
  cursor: pointer;
  font-size: 1rem;
}
.pi-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px;
  background: var(--bg);
  border-radius: 12px;
}
.pi-preview.hidden { display: none; }
.pi-preview-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.pi-preview-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}
.pi-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  padding-right: 28px;
}
.pi-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.pi-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-wa {
  background: #25d366;
  color: #fff;
  border: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-wa:hover { filter: brightness(1.05); }
.btn-call {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-call:hover { background: var(--border); }

@media (max-width: 720px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-info { border-left: none; border-top: 1px solid var(--border); padding: 22px; }
  .pd-name { font-size: 1.3rem; }
  .pd-price { font-size: 1.4rem; }
}
