/* ══════════════════════════════════════════════════════════════════
   THEME SYSTEM — Car Option Store
   Single source of truth for tokens, component classes and fixes.
   MUST be loaded last (after tailwind.css / premium-theme.css /
   animations.css / tailwind-custom.css).
   ══════════════════════════════════════════════════════════════════ */

/* ============================================================
   0. MISSING UTILITY BRIDGE
   (classes referenced in markup but absent from compiled tailwind)
   ============================================================ */
.bg-card-hover { background-color: var(--bg-card-hover, #23262A); }
.hover\:bg-card-hover:hover { background-color: var(--bg-card-hover, #23262A) !important; }

.divide-white\/5 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(255, 255, 255, 0.05); }
.max-h-72 { max-height: 288px; }
.min-h-\[44px\] { min-height: 44px; }
.min-h-\[48px\] { min-height: 48px; }
.h-\[42px\] { height: 42px; }

/* Native controls (selects, scrollbars) should render dark */
:root { color-scheme: dark; }
select.input-dark option,
select option {
  background: #17181B;
  color: #fff;
}

/* ============================================================
   1. LAYOUT — unified container
   ============================================================ */
.container-store {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px)  { .container-store { padding-inline: 24px; } }
@media (min-width: 1024px) { .container-store { padding-inline: 32px; } }

/* Neutralize legacy `container mx-auto px-4` gutters mismatch:
   keep them working but with the same rhythm as container-store. */
main .container.mx-auto { max-width: 1440px; }

/* ============================================================
   2. COMPONENT PRIMITIVES
   ============================================================ */

/* ── Surfaces ── */
.surface-card {
  background: linear-gradient(145deg, #1D1F22 0%, #17181B 100%);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.surface-inset {
  background: rgba(11, 11, 12, 0.5);
  border: 1px solid var(--border-card);
  border-radius: 14px;
}

/* ── Inputs (dark) ── */
.input-dark,
.input-dark:focus {
  background: rgba(11, 11, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-dark::placeholder { color: #6B6B6B; }
.input-dark:focus {
  outline: none;
  border-color: rgba(255, 138, 0, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12) !important;
}

/* ── Buttons ── */
.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #FF8A00 0%, #FF6B00 100%);
  color: #000; font-weight: 700;
  border: none; border-radius: 12px;
  min-height: 44px; padding: 0 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 138, 0, 0.3);
  transition: filter 180ms ease, transform 120ms ease, box-shadow 180ms ease;
}
.btn-accent:hover  { filter: brightness(1.08); box-shadow: 0 6px 24px rgba(255, 138, 0, 0.4); }
.btn-accent:active { transform: scale(0.98); }
.btn-accent:disabled {
  opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4);
  transform: none !important; box-shadow: none !important;
}

.btn-outline-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #E7E7E7; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  min-height: 44px; padding: 0 20px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 138, 0, 0.45);
  color: #fff;
}
.btn-outline-dark:active { transform: scale(0.98); }

/* ── Chips / badges ── */
.chip-dark {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 10px;
  font-size: 12px; font-weight: 500;
  background: rgba(29, 31, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #B8B8B8;
}

/* ============================================================
   3. ACCESSIBILITY — focus & selection
   ============================================================ */
:focus-visible {
  outline: 2px solid rgba(255, 138, 0, 0.75);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: rgba(255, 138, 0, 0.35); color: #fff; }

/* Screen-reader only helper */
.sr-only-x {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   4. HERO — responsive grid fix
   (replaces broken inline `grid-template-columns:46% 1fr`)
   ============================================================ */
[data-hero] .hero-grid {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 16px;
  display: grid;
  grid-template-columns: 1fr;           /* mobile: single column */
  align-items: center;
}
@media (min-width: 640px)  { [data-hero] .hero-grid { padding-inline: 24px; } }
@media (min-width: 1024px) {
  [data-hero] .hero-grid {
    grid-template-columns: 46% 1fr;     /* desktop: content | car visual */
    padding-inline: 40px;
  }
}

/* Hero heights per breakpoint (mobile no longer forces 660px) */
[data-hero] { min-height: 520px; height: 88vh; }
@media (max-width: 639px) {
  [data-hero] { min-height: 480px; height: auto; }
  [data-hero] .hero-content-col { padding-top: 56px !important; padding-bottom: 48px !important; }
}
@media (min-width: 640px)  { [data-hero] { height: 80vh; } }
@media (min-width: 1024px) { [data-hero] { height: 92vh; max-height: 900px; } }

/* Hero background image */
[data-hero] .hero-media picture { display: block; width: 100%; height: 100%; }
@media (min-width: 1024px) {
  /* تصویر عریض دسکتاپ تیره است — روشن‌سازی فقط برای همین نسخه */
  [data-hero] .hero-media-img { filter: brightness(1.7) contrast(1.05); }
}

/* Mobile/tablet hero: stacked layout — car image (hero-bg-mobile, 4:5)
   as a banner on top, content below it on the solid background.
   Content no longer sits on top of the car. */
@media (max-width: 1023px) {
  [data-hero] { height: auto; min-height: 0; }

  [data-hero] .hero-media {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 62vh;
  }
  /* ماشین در تصویر موبایل بین ~۴۰٪ تا ~۶۶٪ ارتفاع است */
  [data-hero] .hero-media-img { object-position: 50% 62%; }

  /* fade پایین بنر به رنگ hero-bg-blocker تا محتوا یکپارچه رویش بنشیند */
  [data-hero] .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
      rgba(7,7,10,0.35) 0%,
      rgba(7,7,10,0) 18%,
      rgba(7,7,10,0) 62%,
      #07070A 100%);
  }

  [data-hero] .hero-scrim { display: none; }

  /* محتوا کمی روی fade پایین بنر بالا می‌آید */
  [data-hero] .hero-grid { margin-top: -64px; }
  [data-hero] .hero-content-col { padding-top: 0 !important; padding-bottom: 40px !important; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  [data-hero] .hero-media { aspect-ratio: 16 / 10; max-height: 58vh; }
  [data-hero] .hero-media-img { object-position: 50% 58%; }
}

/* ============================================================
   5. HEADER — mini cart dropdown + active nav state
   ============================================================ */
.nav-link.active { color: #fff !important; }
.nav-link.active::after { width: 100% !important; }

/* ── Cart count badge — header: small floating number at top-left of icon ── */
#cart_items_count.cart-badge-count {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  min-width: auto;
  height: auto;
  padding: 0;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  color: #FF8A00;
  background: none !important;
  border: none;
  border-radius: 0;
  text-shadow: 0 0 6px rgba(255, 138, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: none;
  animation: none;
}

/* ── Cart count badge — bottom nav: keeps pill style ── */
.bottom-nav .bn-badge {
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 999px;
  border: 1.5px solid #0B0B0C;
  background: linear-gradient(135deg, #FFA020, #FF8A00) !important;
  color: #000;
  box-shadow:
    0 0 6px rgba(255, 138, 0, 0.35),
    0 2px 5px rgba(0, 0, 0, 0.45);
  animation: badgeGlow 3s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% {
    box-shadow:
      0 0 5px rgba(255, 138, 0, 0.30),
      0 2px 5px rgba(0, 0, 0, 0.45);
  }
  50% {
    box-shadow:
      0 0 10px rgba(255, 138, 0, 0.50),
      0 0 16px rgba(255, 138, 0, 0.22),
      0 2px 5px rgba(0, 0, 0, 0.45);
  }
}
.bottom-nav .bn-badge {
  top: 0;
  left: calc(50% + 4px);
}

/* Pop feedback on count change (triggered from site.js via WAAPI) */
@keyframes badgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ── Cart + Mini-cart ── */
.cart-wrapper { position: relative; }

.mini-cart {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: rgba(17, 18, 20, 0.98);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,138,0,0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 60;
}
.cart-wrapper:hover .mini-cart,
.cart-wrapper:focus-within .mini-cart,
.mini-cart.open {
  opacity: 1; visibility: visible; transform: translateY(0);
}
/* موبایل: لمس آیکون مستقیم به /Cart می‌رود و dropdown کاربردی ندارد.
   چون از لبه راست صفحه بیرون می‌زد، (حتی مخفی) صفحه را اسکرول افقی‌پذیر می‌کرد */
@media (max-width: 767px) { .mini-cart { display: none; } }
.mini-cart-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 0;
}
.mini-cart-item + .mini-cart-item { border-top: 1px solid rgba(255,255,255,0.06); }
.mini-cart-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  background: #fff; /* product photos are white-background assets */
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.mini-cart-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ============================================================
   6. MOBILE BOTTOM NAVIGATION (Digikala-style)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  background: rgba(13, 14, 15, 0.96);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px;
  font-size: 10.5px; font-weight: 600;
  color: #8A8D91;
  position: relative;
  transition: color 150ms ease;
}
.bottom-nav a:hover, .bottom-nav a.active { color: #FF8A00; }
.bottom-nav a .material-symbols-outlined { font-size: 23px; }
.bottom-nav .bn-badge {
  position: absolute; top: 4px; left: calc(50% - 4px);
  min-width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #FF8A00; color: #000;
  font-size: 10px; font-weight: 800;
  box-shadow: 0 0 10px rgba(255,138,0,0.5);
}
body { padding-bottom: 58px; }             /* room for bottom nav on mobile */
@media (min-width: 768px) { body { padding-bottom: 0; } .bottom-nav { display: none; } }

/* Scroll-to-top must clear the bottom nav on mobile */
@media (max-width: 767px) {
  #scroll-top-btn { bottom: 74px !important; }
}

/* ============================================================
   7. DARK FIXES for animations.css remnants
   (this file loads after animations.css → same-specificity wins)
   ============================================================ */

/* Skeletons: light → dark glass */
.skeleton,
.skeleton-line,
.skeleton-avatar,
.skeleton-product-card,
.skeleton-image,
.skeleton-text,
.skeleton-title,
.skeleton-price,
.skeleton-button,
.skeleton-specs {
  background: linear-gradient(90deg, #17181B 25%, #212327 50%, #17181B 75%) !important;
  background-size: 200% 100% !important;
}
.loading-overlay { background: rgba(11, 11, 12, 0.72) !important; }

/* Thumbnail active: blue fallback → accent */
.thumbnail-btn.active,
.thumbnail-btn[style*="var(--accent)"] {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.15) !important;
}

/* Product-card hover glow that leaked blue */
.product-card:hover {
  box-shadow: 0 0 28px rgba(255, 138, 0, 0.14), 0 16px 48px rgba(0, 0, 0, 0.55) !important;
}

/* Kill micro-jitter: global button scale from animations.css */
button[type="button"]:hover { transform: none; }
.btn-micro:hover,
.add-to-cart-btn:hover,
.btn-glow:hover { transform: translateY(-1px); }

/* Toast: dark glass instead of bootstrap palette */
.toast-notification,
.site-toast {
  background: rgba(23, 24, 27, 0.97) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #F2F2F2 !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6) !important;
  border-radius: 14px !important;
}
.site-toast.toast-success { border-right: 3px solid #22C55E !important; }
.site-toast.toast-error   { border-right: 3px solid #EF4444 !important; }
.site-toast.toast-info    { border-right: 3px solid #FF8A00 !important; }

/* ============================================================
   8. MISC POLISH
   ============================================================ */

/* Product photo wells stay white on purpose (white-background photos),
   but soften them inside dark cards */
.img-well-light {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Consistent thin divider */
.hr-fade {
  height: 1px; width: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.09), transparent);
  border: none;
}

/* Sticky mobile add-to-cart bar (product page) */
.sticky-buy-bar {
  position: fixed;
  bottom: 58px;                    /* above bottom nav */
  left: 0; right: 0;
  z-index: 45;
  background: rgba(17, 18, 20, 0.97);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  padding: 10px 16px;
  transform: translateY(110%);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sticky-buy-bar.visible { transform: translateY(0); }
@media (min-width: 992px) { .sticky-buy-bar { display: none; } }

/* Orders table wrapper on small screens gets momentum scroll hint */
.table-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Reduced motion: respect globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   9. PRODUCT DETAIL PAGE — premium compact redesign
   ============================================================ */

/* ── Layout shell ── */
.pd-shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px)  { .pd-shell { padding-inline: 24px; } }
@media (min-width: 1024px) { .pd-shell { padding-inline: 32px; } }

/* ── Two-column product card ── */
.pd-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
@media (min-width: 1024px) {
  .pd-card {
    /* gallery ~43%, info ~57% */
    grid-template-columns: minmax(0, 43%) minmax(0, 57%);
  }
}

/* ── Gallery column ── */
.pd-gallery {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 1024px) {
  .pd-gallery {
    padding: 24px 20px 24px 0;
    border-bottom: none;
    border-left: 1px solid rgba(255,255,255,0.05);
  }
}

/* Layout inside gallery: thumbnails on the right (RTL = left visually), main image taking the rest */
.pd-gallery-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
@media (min-width: 640px) {
  .pd-gallery-inner {
    flex-direction: row-reverse; /* RTL: thumbs on right side (start side) */
    align-items: flex-start;
    gap: 10px;
  }
}

/* Main image container */
.pd-main-img-wrap {
  position: relative;
  flex: 1;
  min-height: 260px;
  max-height: 460px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(11,11,12,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 1 / 1;
}
@media (min-width: 1024px) {
  .pd-main-img-wrap {
    max-height: 420px;
  }
}

.pd-main-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: opacity 150ms ease;
}

/* Zoom button */
.pd-zoom-btn {
  position: absolute;
  bottom: 10px;
  left: 10px; /* RTL: left = visual left (start) */
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11,11,12,0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  z-index: 2;
}
.pd-zoom-btn:hover {
  background: rgba(255,138,0,0.18);
  border-color: rgba(255,138,0,0.4);
  color: #FF8A00;
}
.pd-zoom-btn .material-symbols-outlined { font-size: 18px; }

/* Discount badge on main image */
.pd-discount-badge {
  position: absolute;
  top: 10px;
  right: 10px; /* RTL: right = visual right (end) */
  background: linear-gradient(135deg,#e53e3e,#c53030);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(229,62,62,0.4);
  z-index: 2;
  line-height: 1.4;
}

/* Vertical thumbnail strip */
.pd-thumbs {
  display: flex;
  flex-direction: row;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.pd-thumbs::-webkit-scrollbar { display: none; }
@media (min-width: 640px) {
  .pd-thumbs {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 420px;
    padding-bottom: 0;
    scrollbar-width: none;
  }
  .pd-thumbs::-webkit-scrollbar { display: none; }
}

.pd-thumb-btn {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 10px;
  overflow: hidden;
  padding: 4px;
  background: rgba(11,11,12,0.6);
  border: 2px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.pd-thumb-btn img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.pd-thumb-btn:hover {
  border-color: rgba(255,138,0,0.45);
  box-shadow: 0 0 8px rgba(255,138,0,0.2);
}
.pd-thumb-btn.is-active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(255,138,0,0.18) !important;
}

/* ── Info column ── */
.pd-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
@media (min-width: 1024px) {
  .pd-info {
    padding: 24px 24px 24px 24px;
  }
}

/* ── Category chip ── */
.pd-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,138,0,0.09);
  color: #FF8A00;
  border: 1px solid rgba(255,138,0,0.18);
  text-decoration: none;
  transition: background 150ms ease;
  width: fit-content;
  margin-bottom: 10px;
}
.pd-category-chip:hover {
  background: rgba(255,138,0,0.16);
}

/* ── Product title ── */
.pd-title {
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 8px;
}

/* ── Short description ── */
.pd-short-desc {
  font-size: 13px;
  color: #B8B8B8;
  line-height: 1.7;
  margin-bottom: 12px;
}

/* ── Meta row: code + stock ── */
.pd-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pd-code-pill {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #B8B8B8;
  direction: ltr;
}
.pd-stock-ok {
  display: inline-flex; align-items: center; gap: 5px;
  color: #4ade80;
  font-size: 12px; font-weight: 500;
}
.pd-stock-out {
  display: inline-flex; align-items: center; gap: 5px;
  color: #f87171;
  font-size: 12px; font-weight: 500;
}
.pd-stock-ok .material-symbols-outlined,
.pd-stock-out .material-symbols-outlined {
  font-size: 15px;
}

/* ── Reviews mini row ── */
.pd-reviews-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8A8D91;
  margin-bottom: 14px;
}
.pd-reviews-row .material-symbols-outlined { font-size: 15px; color: #FF8A00; }

/* ── Price typography ── */
.pd-price-block {
  margin-bottom: 14px;
}
.pd-price-original {
  font-size: 13px;
  color: #6B6B6B;
  text-decoration: line-through;
  margin-bottom: 2px;
}
.pd-price-discount-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(229,62,62,0.14);
  color: #f87171;
  border: 1px solid rgba(229,62,62,0.2);
  margin-right: 6px;
}
.pd-price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.pd-price-value {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.pd-price-unit {
  font-size: 13px;
  color: #8A8D91;
}
.pd-price-expiry {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #fbbf24;
  margin-top: 6px;
}
.pd-price-expiry .material-symbols-outlined { font-size: 14px; }

/* ── Compatibility card ── */
.pd-compat-card {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(11,11,12,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
  transition: border-color 200ms ease;
}
.pd-compat-card:hover {
  border-color: rgba(255,138,0,0.25);
}
.pd-compat-card.is-universal {
  border-color: rgba(74,222,128,0.18);
  background: rgba(74,222,128,0.04);
}

.pd-compat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pd-compat-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.pd-compat-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(255,138,0,0.1);
  border: 1px solid rgba(255,138,0,0.15);
}
.pd-compat-icon.universal {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.2);
}
.pd-compat-icon .material-symbols-outlined {
  font-size: 18px;
  color: #FF8A00;
}
.pd-compat-icon.universal .material-symbols-outlined {
  color: #4ade80;
}

.pd-compat-texts { min-width: 0; }
.pd-compat-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-compat-sub {
  font-size: 11px;
  color: #8A8D91;
  margin-top: 1px;
}

.pd-compat-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 9px;
  background: rgba(255,138,0,0.08);
  color: #FF8A00;
  border: 1px solid rgba(255,138,0,0.22);
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
  text-decoration: none;
  flex-shrink: 0;
}
.pd-compat-btn:hover {
  background: rgba(255,138,0,0.18);
  border-color: rgba(255,138,0,0.45);
}
.pd-compat-btn .material-symbols-outlined { font-size: 14px; }

/* Compatibility success state */
.pd-compat-success {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #4ade80;
  font-weight: 500;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(74,222,128,0.12);
}
.pd-compat-success .material-symbols-outlined { font-size: 15px; }
.pd-compat-vehicle-name {
  font-size: 12px;
  color: #B8B8B8;
  font-weight: 500;
}
.pd-compat-change-btn {
  font-size: 11px;
  color: #6B6B6B;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 150ms ease;
}
.pd-compat-change-btn:hover { color: #FF8A00; }

/* ── Purchase bar ── */
.pd-purchase-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* Quantity stepper */
.pd-qty-wrap {
  display: flex;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(11,11,12,0.6);
  border: 1px solid rgba(255,255,255,0.09);
  flex-shrink: 0;
}
.pd-qty-btn {
  width: 36px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: #B8B8B8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.pd-qty-btn:hover {
  color: #FF8A00;
  background: rgba(255,138,0,0.08);
}
.pd-qty-btn .material-symbols-outlined { font-size: 18px; }
.pd-qty-input {
  width: 36px; height: 44px;
  background: transparent !important;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  border-left: 1px solid rgba(255,255,255,0.08) !important;
  color: #fff !important;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 0 !important;
  outline: none;
  box-shadow: none !important;
}
/* Hide number input arrows */
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-qty-input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Add to cart CTA — compact, proportional to the quantity stepper */
.pd-cart-btn {
  height: 44px;
  /* no flex:1 — fixed comfortable width, not full-row */
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF8A00 0%, #FF6200 100%);
  color: #000;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,138,0,0.3);
  transition: filter 180ms ease, box-shadow 180ms ease, transform 120ms ease;
  white-space: nowrap;
}
.pd-cart-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 26px rgba(255,138,0,0.45);
  transform: translateY(-1px);
}
.pd-cart-btn:active { transform: scale(0.97); }
.pd-cart-btn .material-symbols-outlined { font-size: 17px; flex-shrink: 0; }

/* Disabled/out-of-stock CTA */
.pd-cart-btn-disabled {
  height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  background: rgba(29,31,34,0.8);
  color: #6B6B6B;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: not-allowed;
  opacity: 0.6;
  white-space: nowrap;
}
.pd-cart-btn-disabled .material-symbols-outlined { font-size: 17px; }

/* ── Secondary actions ── */
.pd-secondary-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pd-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #8A8D91;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 150ms ease;
}
.pd-secondary-btn:hover { color: #FF8A00; }
.pd-secondary-btn .material-symbols-outlined { font-size: 17px; }

/* Wishlist active state on the product page secondary button */
.pd-secondary-btn.wishlist-btn.active {
  color: #ef4444;
}
.pd-secondary-btn.wishlist-btn.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

/* ── Dividers inside info column ── */
.pd-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 14px 0;
}

/* ── Tab nav ── */
.pd-tabs-nav {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: none;
}
.pd-tabs-nav::-webkit-scrollbar { display: none; }
.pd-tab-btn {
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: #8A8D91;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-left: none; border-right: none; border-top: none;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pd-tab-btn:hover { color: #E0E0E0; }
.pd-tab-btn.is-active {
  color: #fff;
  border-bottom-color: var(--accent);
  background: rgba(255,138,0,0.04);
}
.pd-tab-btn .material-symbols-outlined { font-size: 15px; }

/* ── Compatibility vehicle tags ── */
.pd-compat-vehicles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.pd-compat-vehicle-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(255,138,0,0.07);
  border: 1px solid rgba(255,138,0,0.16);
  color: #C8C8C8;
}
.pd-compat-vehicle-tag .material-symbols-outlined {
  color: #FF8A00;
}

/* Sticky mobile buy bar (product-page variant using new classes) */
@media (max-width: 991px) {
  .pd-sticky-bar {
    position: fixed;
    bottom: 58px;
    left: 0; right: 0;
    z-index: 45;
    background: rgba(17,18,20,0.97);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -12px 40px rgba(0,0,0,0.5);
    padding: 10px 16px;
    transform: translateY(110%);
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .pd-sticky-bar.visible { transform: translateY(0); }
}
@media (min-width: 992px) { .pd-sticky-bar { display: none !important; } }

/* Horizontal overflow guard: slide-in animations (translateX) and decorative
   glows must never widen the page on mobile. `clip` (unlike `hidden`) does not
   create a scroll container, so position:sticky inside main keeps working. */
main { overflow-x: clip; }

/* Category tabs (home) — mobile horizontal scroller without visible scrollbar */
.category-tabs { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.category-tabs::-webkit-scrollbar { display: none; }
