:root {
  --bg: #FBF7EF;
  --surface: #FFFFFF;
  --surface-alt: #F4EDDE;
  --text: #2B2519;
  --subtext: #7A7160;
  --primary: #C98A1B;
  --primary-deep: #A66F0F;
  --on-primary: #FFFFFF;
  --accent: #5F7A34;
  --border: #E7DEC9;
  --shadow: 0 10px 30px rgba(43, 37, 25, 0.08);
}

[data-theme="dark"] {
  --bg: #17140E;
  --surface: #211C13;
  --surface-alt: #2B2518;
  --text: #F3EDDF;
  --subtext: #A79C86;
  --primary: #E2A63E;
  --primary-deep: #C98A1B;
  --on-primary: #241A05;
  --accent: #93AE60;
  --border: #383021;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

/* hidden must win over display:grid/flex set on the same element (cart empty-state bug). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: clip; /* no horizontal scroll from decorative overflow (e.g. showcase art) */
}

[dir="rtl"] body { font-family: "Segoe UI", Tahoma, system-ui, sans-serif; }

img { max-width: 100%; display: block; }

/* Sticky top stack: promo banner + header travel together and stay pinned on scroll */
.top-stack {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark { width: 26px; height: 26px; fill: var(--primary); }
.brand-logo { height: 46px; width: auto; max-width: 200px; display: block; object-fit: contain; }

.header-controls { display: flex; align-items: center; gap: 0.5rem; }

/* Primary menu, sits just right of the logo and pushes the controls to the far end. */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: 1.75rem;
  margin-inline-end: auto;
}
.site-nav a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
/* The header already carries language, theme, auth and cart controls — hide the menu
   on narrow screens rather than let the header overflow. */
@media (max-width: 900px) {
  .site-nav { display: none; }
}
/* Season Deal menu item stands out from the rest of the nav. */
.site-nav a.nav-season { color: var(--primary); font-weight: 700; }
.site-nav a.nav-season:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }

/* Season Deal homepage banner: a large, full-width promo image. */
.season-banner {
  max-width: 1240px;
  margin: 2.5rem auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}
.season-banner a { display: block; }
.season-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

/* Season Deal pop-up (once per session). */
.season-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1.2rem; }
.season-modal[hidden] { display: none; }
.season-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px); }
.season-modal-box {
  position: relative; max-width: min(680px, 92vw); max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.season-modal-box img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.season-modal-cta {
  display: inline-block;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 1rem;
  padding: 0.75rem 1.8rem; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, transform 0.15s;
}
.season-modal-cta:hover { background: var(--primary-deep); transform: translateY(-2px); }
.season-modal-close {
  position: absolute;
  top: -14px;
  inset-inline-end: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #111;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Horizontal category rail (just under the trust bar). Full page width so the
   scroll arrows sit near the edges and more (bigger) tiles are in view. */
.cat-rail-section { max-width: none; margin: 2rem auto 1rem; padding: 0 clamp(1.5rem, 4vw, 4rem); }
.cat-rail-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.9rem; color: var(--text); }
.cat-rail-wrap { position: relative; }
.cat-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.4rem 0.2rem 0.6rem;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* old Edge */
}
.cat-rail::-webkit-scrollbar { display: none; } /* Chrome/Safari — arrows drive it */

.cat-chip {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--text);
  text-align: center;
}
.cat-chip-img {
  display: block;
  width: 240px;
  height: 160px;
  border-radius: 20px;
  overflow: hidden;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
  transition: transform 0.18s, box-shadow 0.18s;
}
.cat-chip-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.cat-chip:hover .cat-chip-img { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18); }
.cat-chip:hover .cat-chip-img img { transform: scale(1.06); }
.cat-chip-name { display: block; margin-top: 0.6rem; font-size: 1rem; font-weight: 600; line-height: 1.25; }

/* Soft fade at both ends so cut-off tiles don't look abrupt. */
.cat-rail-wrap::before,
.cat-rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  pointer-events: none;
  z-index: 2;
}
.cat-rail-wrap::before { inset-inline-start: 0; background: linear-gradient(to right, var(--bg), transparent); }
.cat-rail-wrap::after { inset-inline-end: 0; background: linear-gradient(to left, var(--bg), transparent); }
[dir="rtl"] .cat-rail-wrap::before { background: linear-gradient(to left, var(--bg), transparent); }
[dir="rtl"] .cat-rail-wrap::after { background: linear-gradient(to right, var(--bg), transparent); }

/* Circular scroll arrows, vertically centered on the tile row. */
.cat-rail-arrow {
  position: absolute;
  top: 86px;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.cat-rail-arrow svg { width: 20px; height: 20px; }
.cat-rail-prev { inset-inline-start: -8px; }
.cat-rail-next { inset-inline-end: -8px; }
.cat-rail-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-rail-arrow[hidden] { display: none; }
[dir="rtl"] .cat-rail-arrow svg { transform: scaleX(-1); }
@media (hover: none) { .cat-rail-arrow { display: none; } } /* touch devices just swipe */

/* Auth buttons (top right) */
.auth-buttons { display: flex; align-items: center; gap: 0.5rem; }
.logout-form { display: inline-flex; }
.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.hbtn:hover { text-decoration: none; }
.hbtn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 40%, transparent);
}
.hbtn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 50%, transparent); }
.hbtn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.hbtn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.hbtn-ico { font-size: 0.95rem; }

/* Dropdowns (language / theme, top right) */
.dropdown { position: relative; }

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.dropdown-toggle:hover { border-color: var(--primary); }

.dropdown-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.35rem;
  display: none;
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu button,
.dropdown-menu a {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.55rem 0.8rem;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu button:hover,
.dropdown-menu a:hover { background: var(--surface-alt); }
.dropdown-menu button.active,
.dropdown-menu a.active { color: var(--primary); font-weight: 700; }

/* Hero — photo background with slow Ken Burns zoom */
.hero {
  position: relative;
  min-height: clamp(480px, 78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -6%;
  background: url("images/market.webp") center / cover no-repeat;
  animation: kenburns 22s ease-in-out infinite alternate;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 17, 8, 0.55), rgba(23, 17, 8, 0.72));
  z-index: -1;
}

@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.12) translateY(-2%); }
}

.hero-inner {
  max-width: 760px;
  padding: clamp(4rem, 10vw, 6rem) clamp(1rem, 4vw, 3rem);
}

.hero-eyebrow {
  color: #F0C878;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  font-weight: 800;
  color: #FDFAF2;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-sub {
  color: #EDE5D2;
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 560px;
  margin: 0 auto 2.2rem;
}

.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

/* Entrance animation for hero content */
.rise {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 0.8s ease forwards;
}

.rise-1 { animation-delay: 0.1s; }
.rise-2 { animation-delay: 0.25s; }
.rise-3 { animation-delay: 0.4s; }
.rise-4 { animation-delay: 0.55s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 45%, transparent);
}
.btn-primary:hover { box-shadow: 0 9px 26px color-mix(in srgb, var(--primary) 55%, transparent); }

.btn-ghost {
  border: 2px solid rgba(253, 250, 242, 0.7);
  color: #FDFAF2;
}

.btn-ghost:hover { background: rgba(253, 250, 242, 0.12); }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.8rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.feature-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }

.feature-card h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--subtext); font-size: 0.92rem; }

/* Products */
.products { padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 3rem); background: var(--surface-alt); }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 2.2rem;
}

.product-grid {
  display: grid;
  /* Fill the full page width with cards of a fixed size (~same box), so more fit per row. */
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.4rem;
  max-width: none;
  margin: 0 auto;
}
@media (max-width: 680px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; } }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.product-photo {
  position: relative;
  height: 200px;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface-alt)),
                    color-mix(in srgb, var(--accent) 8%, var(--surface-alt)));
}
.product-photo::after {
  content: "🛒";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0.3;
}
.product-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-photo img { transform: scale(1.07); }

.product-card h3 { padding: 1rem 1.2rem 0.2rem; font-size: 1.05rem; }
.product-card p { padding: 0 1.2rem 1.2rem; color: var(--subtext); font-size: 0.9rem; }

.products-note {
  text-align: center;
  color: var(--subtext);
  margin-top: 2rem;
  font-size: 0.95rem;
}

/* Gallery carousel (swipeable) */
.gallery { padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 3rem); }

.carousel { position: relative; max-width: 900px; margin: 0 auto; }

.carousel-viewport {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  touch-action: pan-y;
  cursor: grab;
}

.carousel-viewport:active { cursor: grabbing; }

.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
}

.slide { position: relative; flex: 0 0 100%; }

.slide img {
  width: 100%;
  height: clamp(260px, 48vw, 480px);
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.slide figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 2.2rem 1.4rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(23, 17, 8, 0.78));
  color: #FDFAF2;
  font-weight: 600;
  font-size: 0.95rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.carousel-btn:hover { background: var(--surface); transform: translateY(-50%) scale(1.08); }

.carousel-prev { inset-inline-start: 0.8rem; }
.carousel-next { inset-inline-end: 0.8rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-dots button.active {
  background: var(--primary);
  transform: scale(1.35);
}

/* Apps */
/* Full-width blue band, clearly separated from the Promotions section above. */
.apps { padding: 0; background: var(--bg); }
.apps-inner {
  position: relative;
  overflow: hidden;
  max-width: none;
  margin: 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  border-radius: 0;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
}
.apps-inner > * { position: relative; z-index: 1; }
/* Faint oversized phone as a background flourish. */
.apps-inner::after {
  content: "📱";
  position: absolute;
  font-size: 12rem;
  line-height: 1;
  opacity: 0.12;
  inset-inline-end: -1.8rem;
  bottom: -3rem;
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
}
.apps-badge-ico {
  width: 64px; height: 64px; margin: 0 auto 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center; font-size: 2rem;
}
.apps h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.7rem; color: #fff; }
.apps p { color: rgba(255, 255, 255, 0.88); margin-bottom: 1.7rem; }

/* App stores: a QR code above each store badge (scan to download). */
.app-stores { display: flex; gap: clamp(1.2rem, 4vw, 2.4rem); justify-content: center; flex-wrap: wrap; }
.app-store-col { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.app-qr {
  display: inline-flex;
  background: #fff;
  padding: 0.5rem;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.app-qr img { display: block; width: 112px; height: 112px; }
/* Both store badges the same height (auto width keeps each badge's own proportions). */
.store-badge { height: 48px; width: auto; display: block; }

/* Footer */
.site-footer {
  padding: 1.6rem;
  text-align: center;
  color: var(--subtext);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.footer-credits { font-size: 0.72rem; opacity: 0.75; margin-top: 0.3rem; }
.footer-addr { margin-bottom: 0.4rem; font-weight: 600; }
.footer-addr a { color: var(--primary); text-decoration: none; }
.footer-addr a:hover { text-decoration: underline; }

/* Scroll reveal (staggered via JS order) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .rise { opacity: 1; transform: none; transition: none; animation: none; }
  .hero-bg { animation: none; }
  .carousel-track { transition: none; }
  .btn:hover, .feature-card:hover, .product-card:hover { transform: none; }
  .product-card:hover .product-photo img { transform: none; }
}

/* Dynamic pages (Node/EJS) */
.card-link { text-decoration: none; color: inherit; display: block; }
.price-tag { color: var(--primary); font-weight: 800; padding: 0 1.2rem 1.2rem; }
.price-big { font-size: 1.5rem; padding: 0; margin: 0.6rem 0 1rem; }
.page-top { padding-top: 2.5rem; }
.breadcrumb { max-width: 1080px; margin: 0 auto 1rem; font-size: 0.9rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.product-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1080px;
  margin: 0 auto;
  align-items: center;
}
.product-detail-photo { border-radius: 22px; overflow: hidden; border: 1px solid var(--border); }
.product-detail-photo img { width: 100%; height: auto; display: block; }
.product-detail-body h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 0.4rem; }
.product-detail-desc { color: var(--subtext); margin-bottom: 1.6rem; line-height: 1.7; }

/* ---- Cart badge + add-to-cart (shop v2) ---- */
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.cart-link:hover { border-color: var(--primary); color: var(--primary); }
.cart-ico { width: 20px; height: 20px; }

/* ---- Mobile header: keep everything on one row without overflow ---- */
@media (max-width: 620px) {
  .site-header { padding: 0.55rem 0.8rem; gap: 0.4rem; }
  .header-controls { gap: 0.3rem; }
  .brand-logo { height: 38px; }
  .brand span { font-size: 1.05rem; }
  /* Language & theme become compact icon-only buttons (labels hidden). */
  .header-controls .dropdown-toggle { padding: 0.45rem; gap: 0; }
  .header-controls .dropdown-toggle > span:not(.dropdown-icon) { display: none; }
  .header-controls .dropdown-toggle .dropdown-icon { font-size: 1.1rem; margin: 0; }
  /* Slim auth buttons + drop their inline icon. */
  .auth-buttons { gap: 0.3rem; }
  .hbtn { padding: 0.45rem 0.7rem; font-size: 0.8rem; }
  .hbtn-ico { display: none; }
  .cart-link { width: 38px; height: 38px; }
}
@media (max-width: 380px) {
  .hbtn { padding: 0.42rem 0.55rem; font-size: 0.75rem; }
  .header-controls { gap: 0.25rem; }
}
.cart-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  background: var(--primary); color: #fff;
  font-size: 0.68rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 2px solid var(--bg);
}
.btn-add {
  width: 100%;
  margin-top: auto;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem;
  border-radius: 0 0 20px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add:hover { background: var(--primary-deep); }
.btn-add.added { background: var(--accent); }
.product-card { display: flex; flex-direction: column; }
.product-detail .btn-add { width: auto; border-radius: 999px; padding: 0.8rem 1.6rem; margin-top: 0.5rem; }

/* Product gallery */
.product-detail-media { display: flex; flex-direction: column; gap: 0.7rem; }
.pd-noimg { height: 300px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--surface-alt); border-radius: 22px; }
.pd-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pd-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: none; padding: 0; cursor: pointer; }
.pd-thumb.on { border-color: var(--primary); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Cart page ---- */
.cart-wrap { display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: 1.5rem; max-width: 1000px; margin: 1.5rem auto 0; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 0.8rem; }
.cart-line {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.8rem;
}
.cl-img { width: 66px; height: 66px; border-radius: 10px; overflow: hidden; background: var(--surface-alt); flex-shrink: 0; }
.cl-img img { width: 100%; height: 100%; object-fit: cover; }
.cl-body { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.cl-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.cl-qty { display: flex; align-items: center; gap: 0.5rem; }
.cl-qty button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1rem; cursor: pointer;
}
.cl-remove { border: none !important; background: none !important; }
.cart-summary { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 0.7rem; }
.coupon-row { display: flex; gap: 0.5rem; }
.coupon-row input { flex: 1; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.btn-sm-dark { background: var(--text); color: var(--bg); border: none; border-radius: 10px; padding: 0 0.9rem; font-weight: 700; cursor: pointer; }
.coupon-msg { font-size: 0.82rem; min-height: 1em; }
.coupon-msg.ok { color: var(--accent); }
.coupon-msg.err { color: var(--danger, #B3402F); }
.sum-row { display: flex; justify-content: space-between; font-size: 0.92rem; }
.sum-total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.full { width: 100%; text-align: center; }
.continue-link { text-align: center; color: var(--accent); font-size: 0.88rem; font-weight: 600; }
.empty-cart {
  max-width: 460px;
  margin: 1rem auto 3rem;
  text-align: center;
  padding: 3.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}
.empty-cart-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-alt));
}
.empty-cart-text { font-size: 1.05rem; font-weight: 600; color: var(--subtext); }

/* ---- Checkout ---- */
.checkout-wrap { display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: 1.5rem; max-width: 1000px; margin: 1.5rem auto 0; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 0.9rem; }
.checkout-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--subtext); }
.checkout-form input, .checkout-form textarea { padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 0.95rem; background: var(--surface); color: var(--text); }
.cod-banner { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem; font-size: 0.9rem; }
.checkout-summary { position: sticky; top: 80px; }
.checkout-lines, .co-line { display: flex; flex-direction: column; gap: 0.4rem; }
.co-line { flex-direction: row; justify-content: space-between; font-size: 0.9rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.3rem; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.9rem; }

@media (max-width: 760px) {
  .cart-wrap, .checkout-wrap { grid-template-columns: 1fr; }
}

/* ---- Customer auth (login/signup/forgot/reset) ---- */
.account-link { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-inline-end: 0.6rem; }
.auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem; width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 0.85rem; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.4rem; font-weight: 800; text-align: center; margin-bottom: 0.4rem; }
.auth-card label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--subtext); }
.auth-card input {
  padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px;
  font-size: 0.95rem; font-family: inherit; background: var(--bg); color: var(--text);
}
.auth-error { background: #FDECEA; color: #B3402F; padding: 0.6rem; border-radius: 8px; font-size: 0.85rem; text-align: center; }
.auth-ok { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); padding: 0.7rem; border-radius: 8px; font-size: 0.88rem; text-align: center; }
.auth-hint { font-size: 0.78rem; color: var(--subtext); }
.auth-forgot { font-size: 0.82rem; color: var(--accent); font-weight: 600; align-self: flex-end; }
.auth-alt { font-size: 0.86rem; text-align: center; color: var(--subtext); }
.auth-alt a, .auth-devlink { color: var(--accent); font-weight: 700; }
.auth-devlink { word-break: break-all; font-size: 0.8rem; display: block; padding: 0.5rem; background: var(--surface-alt); border-radius: 8px; }
.checkout-login-hint { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.85rem; }
.checkout-login-hint a { color: var(--accent); font-weight: 700; }

/* ---- Variant picker (product page) ---- */
.variant-picker { margin: 0.3rem 0 1rem; }
.variant-title { font-size: 0.85rem; font-weight: 700; color: var(--subtext); display: block; margin-bottom: 0.5rem; }
.variant-opts { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.variant-opt {
  display: flex; flex-direction: column; gap: 0.15rem; align-items: center;
  border: 2px solid var(--border); border-radius: 12px;
  padding: 0.5rem 0.9rem; cursor: pointer; min-width: 74px;
}
.variant-opt.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.variant-opt input { display: none; }
.vo-label { font-weight: 700; font-size: 0.9rem; }
.vo-price { font-size: 0.8rem; color: var(--primary-deep); font-weight: 600; }
.price-tag .from { font-size: 0.72rem; font-weight: 600; color: var(--subtext); }

/* ---- Discount / old price ---- */
.product-photo { position: relative; }
.old-price { color: var(--subtext); text-decoration: line-through; font-weight: 600; font-size: 0.85em; margin-inline-start: 0.4rem; }
.price-line { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; padding: 0 1.2rem; }
.price-line .price-tag { padding: 0; }
.price-big-old { font-size: 1.05rem; }
.discount-badge {
  position: absolute; top: 0.6rem; inset-inline-start: 0.6rem; z-index: 2;
  background: #e11d48; color: #fff; font-weight: 800; font-size: 0.8rem;
  padding: 0.2rem 0.5rem; border-radius: 999px; letter-spacing: 0.02em;
}

/* ---- Subcategory grid on a category page ---- */
.subcat-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.subcat-card {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.9rem 0.5rem 0.5rem;
  border: 1px solid var(--border, #e5e7eb); border-radius: 999px; background: var(--card, #fff);
  text-decoration: none; color: inherit; font-weight: 700; transition: transform 0.15s, box-shadow 0.15s;
}
.subcat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.subcat-photo { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--bg, #f3f4f6); flex: 0 0 auto; }
.subcat-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Account page ---- */
.muted-text { color: var(--subtext); font-size: 0.9rem; }
.account-section { max-width: 720px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 1.5rem); }
.account-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: clamp(1.1rem, 3vw, 1.5rem); box-shadow: var(--shadow);
}
.account-id { display: flex; align-items: center; gap: 1rem; }
.account-avatar {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 800;
}
.account-hello { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.1rem; }
.name-edit { margin-top: 0.45rem; }
.name-edit summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--primary); list-style: none; display: inline-block; }
.name-edit summary::-webkit-details-marker { display: none; }
.name-edit-form { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.name-edit-form input { padding: 0.45rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.name-edit-form button { padding: 0.45rem 0.9rem; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.account-logout {
  padding: 0.5rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text); font-weight: 700; font-size: 0.85rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.account-logout:hover { border-color: var(--primary); color: var(--primary); }
.account-orders-title { margin: 1.7rem 0 1rem; font-size: 1.25rem; font-weight: 800; }
.account-empty {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: clamp(2rem, 6vw, 3rem) 1.5rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
}
.account-empty-ico { font-size: 2.6rem; }
.account-orders { display: flex; flex-direction: column; gap: 1rem; }
.account-order {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.ao-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.ao-id { font-weight: 700; }
.ao-items { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; padding: 0.3rem 0; border-top: 1px solid var(--border); }
.ao-items li { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.3rem; }
.ao-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.ao-total { font-size: 0.98rem; }
.ao-track { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }
.ao-track:hover { text-decoration: underline; }
.status-tag { padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.status-waiting_confirmation { background: #FEF08A; color: #854D0E; }
.status-confirmed { background: #DDD6FE; color: #5B21B6; }
.status-waiting_delivery { background: #BFDBFE; color: #1E40AF; }
.status-on_delivery { background: #99F6E4; color: #0F766E; }
.status-delivered { background: #BBF7D0; color: #15803D; }
.status-cancelled { background: #FECACA; color: #B91C1C; }
.status-returned { background: #E2E8F0; color: #475569; }
.badge-cod { background: #FEF3C7; color: #92600A; padding: 0.15rem 0.55rem; border-radius: 6px; font-size: 0.72rem; font-weight: 700; margin-inline-start: 0.5rem; }

/* ---- Promotional scrolling banner ---- */
.promo-banner {
  background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 0;
}
.promo-banner-track {
  display: flex;
  width: max-content;
  animation: promo-scroll 45s linear infinite;
  will-change: transform;
}
/* Uniform trailing space on every copy (incl. the seam) keeps the -50% loop seamless. */
.promo-banner-text { font-size: 0.9rem; font-weight: 700; padding-inline-end: 3rem; white-space: nowrap; }
.promo-banner:hover .promo-banner-track { animation-play-state: paused; }
@keyframes promo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
[dir="rtl"] .promo-banner-track { animation-name: promo-scroll-rtl; }
@keyframes promo-scroll-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
  .promo-banner-track { animation: none; padding-inline-start: 1rem; }
  .promo-banner-text:nth-child(n+2) { display: none; }
}

/* ============ Apple-style storefront ============ */

/* Richer reveal: fade + slight rise + scale, staggered by the observer */
.reveal { opacity: 0; transform: translateY(34px) scale(0.985); transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1); }
.reveal.visible { opacity: 1; transform: none; }

/* Scroll cue under the hero */
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border: 2px solid rgba(255,255,255,0.6); border-radius: 14px; z-index: 1; }
.scroll-cue span { position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: #fff; border-radius: 2px; animation: scrollcue 1.6s ease-in-out infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* Trust bar */
.trust-bar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 6vw, 5rem);
  padding: 1.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.trust-item { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.trust-ico { font-size: 1.3rem; }

/* Full-bleed parallax chapters */
.showcase {
  position: relative;
  min-height: clamp(300px, 42vh, 440px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* parallax on desktop */
}
/* Supermarket chapters: bright branded gradients (no photos) with a big emoji accent. */
.showcase { background-attachment: scroll; } /* gradients don't need parallax */
.showcase-honey { background: linear-gradient(135deg, #1B5E20, #43A047 55%, #66BB6A); }
.showcase-oil { background: linear-gradient(135deg, #E65100, #F57C00 55%, #FB8C00); }
.showcase-natural { background: linear-gradient(135deg, #006064, #00838F 55%, #26C6DA); }
.showcase-honey::after { content: '🥬'; }
.showcase-oil::after { content: '🛒'; }
.showcase-natural::after { content: '🧴'; }
.showcase::after {
  position: absolute;
  inset-inline-end: clamp(1rem, 6vw, 6rem);
  bottom: -1.5rem;
  font-size: clamp(6rem, 16vw, 12rem);
  line-height: 1;
  opacity: 0.16;
  pointer-events: none;
}
.showcase-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.28)); }
.showcase-content { position: relative; z-index: 1; max-width: 720px; padding: 2rem; color: #fff; }
.showcase-content h2 {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
  margin-bottom: 1rem;
}
.showcase-content p { font-size: clamp(1.05rem, 2.4vw, 1.5rem); color: #F0ECE2; max-width: 560px; margin: 0 auto 1.8rem; }
.showcase-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
  color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}
.showcase-cta:hover { background: rgba(255,255,255,0.28); transform: translateY(-2px); }

/* Alternate product section background for rhythm */
.products-alt { background: var(--bg); }
.section-title { letter-spacing: -0.02em; }

/* Touch devices: fixed backgrounds are janky, switch to scroll */
@media (max-width: 900px), (hover: none) {
  .showcase { background-attachment: scroll; min-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Checkout address + city row */
.checkout-row { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
@media (min-width: 560px) { .checkout-row { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.checkout-city select {
  padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; background: var(--surface); color: var(--text); width: 100%;
}

/* ---- Order confirmation ---- */
.confirm-section { display: flex; justify-content: center; }
.confirm-card {
  max-width: 560px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: clamp(1.6rem, 5vw, 2.6rem); box-shadow: var(--shadow);
}
.confirm-check {
  width: 84px; height: 84px; margin: 0 auto 1.2rem; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 2.8rem; font-weight: 800;
  display: grid; place-items: center; animation: pop 0.45s ease;
}
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.confirm-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.6rem; }
.confirm-text { color: var(--subtext); margin-bottom: 1.4rem; }
.confirm-next { background: var(--surface-alt); border-radius: 14px; padding: 1rem; margin-bottom: 1.4rem; }
.confirm-next-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); display: block; margin-bottom: 0.7rem; }
.confirm-steps { display: flex; align-items: flex-start; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.confirm-step { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.82rem; font-weight: 600; max-width: 90px; }
.confirm-step span { font-size: 1.5rem; }
.confirm-step-sep { color: var(--muted); align-self: center; }
[dir="rtl"] .confirm-step-sep { transform: scaleX(-1); }
.confirm-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* ---- Order tracking ---- */
/* Force the plain page bg behind the form so the card visibly floats (the .products
   band is --surface-alt, which is lighter than --surface in dark mode and hid the card). */
.track-section { background: var(--bg); }
.track-section .section-title, .track-hero, .track-result, .track-form { max-width: 480px; margin-inline: auto; }
.track-result, .track-form {
  position: relative; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 12%, var(--border));
  border-radius: 18px; padding: clamp(1.5rem, 4vw, 2.2rem);
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.5), 0 6px 18px -10px rgba(0, 0, 0, 0.25);
}
.track-result::before, .track-form::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-start-start-radius: 18px; border-start-end-radius: 18px;
}

/* Empty-state hero */
.track-hero { text-align: center; max-width: 460px; margin: 0 auto 1.4rem; }
.track-hero-icon {
  width: 74px; height: 74px; margin: 0 auto 1rem; border-radius: 22px;
  display: grid; place-items: center; font-size: 2.1rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, var(--surface)), color-mix(in srgb, var(--accent) 18%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--primary) 22%, transparent);
}
.track-hero-title { margin: 0 0 0.4rem; }
.track-hero-sub { color: var(--muted); margin: 0; font-size: 0.98rem; line-height: 1.5; }

.track-form { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.05rem; }
.track-field { display: flex; flex-direction: column; gap: 0.4rem; }
.track-field-label { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.track-input-wrap { position: relative; display: flex; align-items: center; }
.track-input-icon {
  position: absolute; inset-inline-start: 0.9rem; font-size: 1rem; opacity: 0.55;
  pointer-events: none; line-height: 1;
}
.track-form input {
  width: 100%; padding-block: 0.9rem; padding-inline-start: 2.5rem; padding-inline-end: 0.9rem;
  border: 1.5px solid var(--border); border-radius: 12px; font-family: inherit; font-size: 1rem;
  background: var(--bg); color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
.track-form input::placeholder { color: var(--muted); opacity: 0.7; }
.track-form input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
.track-submit {
  margin-top: 0.4rem; padding-block: 0.95rem; font-size: 1rem; font-weight: 700;
  border-radius: 12px; letter-spacing: 0.01em;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 20%, transparent);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.track-submit:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
.track-submit:active { transform: translateY(0); }
.track-help { text-align: center; color: var(--muted); font-size: 0.82rem; margin: 0.1rem 0 0; line-height: 1.5; }
.track-error { margin: 0 0 0.2rem; }
.track-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.track-order-no { font-size: 1.4rem; font-weight: 800; }
.track-cod { margin-inline-start: auto; font-size: 0.8rem; font-weight: 700; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); padding: 0.25rem 0.7rem; border-radius: 999px; }
.track-terminal { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; padding: 0.7rem 1rem; border-radius: 12px; margin: 0.9rem 0; }
.track-terminal-cancelled { background: #FDECEA; color: #B3402F; }
.track-terminal-returned { background: #FFF4E5; color: #8A5A00; }
.track-timeline { list-style: none; padding: 0; margin: 1.4rem 0; }
.track-step { display: flex; align-items: center; gap: 0.9rem; padding: 0.45rem 0; position: relative; }
.ts-dot {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; z-index: 1;
  display: grid; place-items: center; font-size: 1.05rem;
  background: var(--surface-alt); border: 2px solid var(--border); color: var(--muted);
}
.ts-label { font-size: 0.98rem; font-weight: 600; }
.track-step:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 18px; top: 40px; height: calc(100% - 30px);
  width: 2px; background: var(--border); z-index: 0;
}
.track-step.is-done .ts-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.track-step.is-done:not(:last-child)::after { background: var(--primary); }
.track-step.is-current .ts-dot { background: #fff; border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); animation: tpulse 1.7s infinite; }
.track-step.is-current .ts-label { font-weight: 800; color: var(--primary); }
.track-step.is-todo { opacity: 0.5; }
.track-timeline.is-terminal .track-step { opacity: 0.4; }
@keyframes tpulse { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); } 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--primary) 6%, transparent); } }
.track-items { border-top: 1px solid var(--border); margin-top: 0.6rem; padding-top: 1rem; }
.track-item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; font-size: 0.92rem; }
.track-total { display: flex; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 0.5rem; padding-top: 0.6rem; font-size: 1.05rem; }
.track-result .btn-ghost { margin-top: 1.2rem; }
.footer-links { margin-bottom: 0.4rem; }
.footer-links a { color: var(--primary); font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-social { display: flex; gap: 0.9rem; justify-content: center; margin-bottom: 0.7rem; }
.footer-social a { color: var(--subtext); display: inline-flex; transition: color 0.15s, transform 0.15s; }
.footer-social a:hover { color: var(--primary); transform: translateY(-2px); }
