/* ==========================================================================
   PartChin — Chinese-car auto parts store (Iran)
   Static mockup design system · RTL · Red + Dark
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --brand: #E11D2A;          /* primary red */
  --brand-dark: #B4141F;
  --brand-tint: #FDECEC;
  --ink: #14181F;            /* near-black for header/footer */
  --ink-2: #1F252E;
  --ink-3: #2A313C;

  /* Neutrals */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --line: #E7E9ED;
  --line-2: #EEF0F3;
  --text: #1A1D22;
  --muted: #6B7280;
  --muted-2: #9AA1AC;

  /* Accents */
  --gold: #F5A623;
  --green: #1FA35A;
  --green-tint: #E7F6ED;
  --star: #F6A609;

  /* Shape */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Shadow */
  --sh-1: 0 1px 2px rgba(20, 24, 31, .06), 0 1px 3px rgba(20, 24, 31, .04);
  --sh-2: 0 4px 14px rgba(20, 24, 31, .08);
  --sh-3: 0 12px 34px rgba(20, 24, 31, .14);

  /* Layout */
  --maxw: 1440px;
  --gutter: 24px;
  --header-h: 68px;

  --font: "Vazirmatn", "IRANSans", Tahoma, system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.35; }
input, select { font-family: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.row { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.grow { flex: 1; }
.hide-mobile { display: initial; }
.section { padding: 34px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px;
  transition: transform .05s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(225,29,42,.28); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--brand-tint); color: var(--brand); }
.btn-ghost:hover { background: #fbdcdc; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { background: #fff; border: 1.5px solid var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
.badge-off { background: var(--brand); color: #fff; }
.badge-new { background: var(--green-tint); color: var(--green); }
.badge-stock { background: var(--green-tint); color: var(--green); }
.badge-out { background: #F3F4F6; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); transition: .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.topbar { background: var(--ink); color: #cfd4dc; font-size: 12.5px; }
.topbar .container { min-height: 40px; }
.topbar a { color: #cfd4dc; transition: .2s; }
.topbar a:hover { color: #fff; }
.topbar .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(31,163,90,.2); }
.topbar-links { gap: 20px; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
body.admin-bar .header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .header { top: 46px; } }
.header-main { gap: 20px; padding: 14px 0; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: block;
  box-shadow: 0 6px 16px rgba(225,29,42,.28);
}
.logo-text b { display: block; font-size: 19px; font-weight: 900; letter-spacing: -.3px; }
.logo-text span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: -2px; }

/* Search */
.search { flex: 1; min-width: 0; position: relative; }
.search-box { display: flex; align-items: center; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; transition: .2s; }
.search-box:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(225,29,42,.08); }
.search-cat { display: flex; align-items: center; gap: 6px; padding: 0 14px; height: 46px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.search input { flex: 1; border: 0; background: transparent; height: 46px; padding: 0 14px; font-size: 14px; outline: none; }
.search-btn { width: 52px; height: 46px; background: var(--brand); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.search-btn:hover { background: var(--brand-dark); }

/* Header actions */
.h-actions { gap: 8px; flex-shrink: 0; }
.icon-btn { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); transition: .2s; }
.icon-btn:hover { background: var(--bg); }
.icon-btn .count { position: absolute; top: 2px; inset-inline-start: 6px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; display: grid; place-items: center; }
.icon-btn small { font-size: 11px; color: var(--muted); display: block; line-height: 1.2; }
.icon-btn b { font-size: 13px; font-weight: 700; }

.svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.svg-sm { width: 18px; height: 18px; }

/* ==========================================================================
   NAV + MEGA MENU
   ========================================================================== */
.nav { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 55; }
.nav-inner { gap: 6px; height: 52px; }
.nav-link { display: flex; align-items: center; gap: 7px; padding: 0 14px; height: 52px; font-size: 14px; font-weight: 600; color: var(--text); border-bottom: 3px solid transparent; transition: .2s; }
.nav-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
.nav-cats { background: var(--brand); color: #fff !important; border-radius: var(--r-sm) var(--r-sm) 0 0; font-weight: 800; }
.nav-cats:hover { border-bottom-color: transparent; color: #fff; }

.has-mega { position: relative; }
.mega {
  position: absolute; inset-inline-start: 0; top: 100%;
  width: 800px; max-width: calc(100vw - 40px);
  background: #fff; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r) var(--r); box-shadow: var(--sh-3);
  display: flex; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .18s ease; z-index: 80;
}
.has-mega:hover .mega, .mega:hover, .mega.open { opacity: 1; visibility: visible; transform: translateY(0); }

/* left rail: category list */
.mega-list { width: 266px; flex-shrink: 0; background: var(--bg); border-inline-end: 1px solid var(--line); padding: 8px; max-height: 460px; overflow-y: auto; }
.mega-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #374151; transition: .12s; }
.mega-item .mi-ic { width: 24px; height: 24px; color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.mega-item .mi-ic .svg { width: 20px; height: 20px; }
.mega-item .mi-label { flex: 1; }
.mega-item .mi-arrow { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .3; }
.mega-item.is-active { background: #fff; color: var(--brand); box-shadow: var(--sh-1); }
.mega-item.is-active .mi-arrow { opacity: 1; }
.mega-item--cars { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 14px; }

/* right area: flyout panels */
.mega-panels { flex: 1; padding: 20px 22px; min-height: 300px; }
.mega-panel { display: none; }
.mega-panel.is-active { display: block; animation: megaFade .18s ease; }
@keyframes megaFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.mega-panel-head { font-size: 15px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.mega-all { font-size: 12px; color: var(--brand); font-weight: 700; }
.mega-all:hover { text-decoration: underline; }
.mega-subs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
.mega-subs a { padding: 8px 0; font-size: 13px; color: #4b5563; border-bottom: 1px solid var(--line-2); transition: .12s; }
.mega-subs a:hover { color: var(--brand); padding-inline-start: 4px; }
.mega-cars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mega-car { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .18s; }
.mega-car:hover { border-color: var(--brand); box-shadow: var(--sh-1); transform: translateY(-2px); }
.mega-car-logo { height: 34px; display: grid; place-items: center; }
.mega-car-logo img { max-height: 34px; max-width: 64px; object-fit: contain; }
.mega-car-logo.is-text { font-weight: 900; font-size: 13px; color: var(--ink); }
.mega-car .mc-label { font-size: 11px; color: #4b5563; }
.mega-car:hover .mc-label { color: var(--brand); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding-top: 22px; }
.hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.hero-main {
  border-radius: var(--r-lg); overflow: hidden; position: relative; min-height: 340px;
  background: radial-gradient(120% 140% at 85% 20%, #33404f 0%, var(--ink) 55%, #0c0f14 100%);
  color: #fff; display: flex; align-items: center; padding: 42px;
}
.hero-main::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='2'%3E%3Ccircle cx='330' cy='90' r='120'/%3E%3Ccircle cx='330' cy='90' r='80'/%3E%3Ccircle cx='330' cy='90' r='40'/%3E%3C/g%3E%3C/svg%3E") no-repeat left top; pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 460px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; background: rgba(225,29,42,.18); color: #ff9ba0; padding: 6px 13px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; margin-bottom: 16px; }
.hero-main h1 { font-size: 34px; font-weight: 900; line-height: 1.3; margin-bottom: 12px; }
.hero-main h1 em { color: var(--brand); font-style: normal; }
.hero-main p { color: #c3c9d2; font-size: 15px; margin: 0 0 22px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.hero-card { border-radius: var(--r); padding: 20px; color: #fff; display: flex; flex-direction: column; justify-content: center; min-height: 160px; position: relative; overflow: hidden; }
.hero-card.c1 { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.hero-card.c2 { background: linear-gradient(135deg, #2c3846, #1a212b); }
.hero-card h3 { font-size: 18px; margin-bottom: 6px; }
.hero-card small { opacity: .85; font-size: 12.5px; }
.hero-card .go { margin-top: 12px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }

/* ==========================================================================
   SERVICE / TRUST STRIP
   ========================================================================== */
.services { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; margin-top: 24px; }
.services-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.service { display: flex; align-items: center; gap: 12px; padding: 16px; border-inline-start: 1px solid var(--line-2); }
.service:first-child { border-inline-start: 0; }
.service .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.service b { display: block; font-size: 13.5px; }
.service small { color: var(--muted); font-size: 12px; }

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sec-title { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; }
.sec-title::before { content: ""; width: 5px; height: 24px; border-radius: 4px; background: var(--brand); }
.sec-link { font-size: 13px; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 5px; }
.sec-link:hover { gap: 9px; }

/* ==========================================================================
   CAR BRAND PICKER
   ========================================================================== */
.brandpick { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.brandpick-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.brand-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 10px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff;
  transition: .2s; text-align: center;
}
.brand-tile:hover { border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-3px); }
.brand-logo {
  width: 66px; height: 66px; border-radius: 16px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); flex-shrink: 0; padding: 9px; overflow: hidden;
}
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo.is-text { background: linear-gradient(135deg, var(--ink-2), var(--ink)); border: 0; color: #fff; font-weight: 900; font-size: 17px; letter-spacing: -.5px; }
.brand-logo.is-all { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border: 0; color: #fff; font-weight: 900; font-size: 18px; }
.brand-tile b { font-size: 13px; }
.brand-tile small { font-size: 11px; color: var(--muted); }

/* ==========================================================================
   CATEGORY TILES
   ========================================================================== */
.cats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 12px; text-align: center; transition: .2s; }
.cat-tile:hover { border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-3px); }
.cat-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 16px; background: var(--bg); color: var(--brand); display: grid; place-items: center; transition: .2s; }
.cat-tile:hover .cat-ic { background: var(--brand); color: #fff; }
.cat-tile b { display: block; font-size: 13.5px; }
.cat-tile small { color: var(--muted); font-size: 11.5px; }
.cat-ic .svg { width: 30px; height: 30px; }

/* ==========================================================================
   PRODUCT CARD (Digikala style)
   ========================================================================== */
.prod-rail { position: relative; }
.prod-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; transition: .2s; position: relative; display: flex; flex-direction: column; }
.pcard:hover { box-shadow: var(--sh-2); border-color: #dfe2e7; }
.pcard-media { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: #fff; display: grid; place-items: center; margin-bottom: 10px; }
.pcard-media img, .pcard-media svg.part { width: 82%; height: 82%; object-fit: contain; }
.pcard-badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.pcard-fav { position: absolute; top: 8px; inset-inline-end: 8px; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); display: grid; place-items: center; color: var(--muted); z-index: 2; }
.pcard-fav:hover { color: var(--brand); }
.pcard-brand { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.pcard-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.6; margin: 3px 0 8px; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title:hover { color: var(--brand); }
.pcard-fit { font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 3px 8px; display: inline-flex; align-self: flex-start; margin-bottom: 10px; }
.pcard-rate { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pcard-rate .star { color: var(--star); }
.pcard-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price-old { font-size: 12px; color: var(--muted-2); text-decoration: line-through; }
.price-now { font-size: 16px; font-weight: 900; color: var(--text); display: flex; align-items: baseline; gap: 4px; }
.price-now .cur { font-size: 11px; font-weight: 600; color: var(--muted); }
.pcard-add { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; transition: .2s; }
.pcard-add:hover { background: var(--brand); color: #fff; }

/* rail scroll on small screens */
.rail-scroll { display: none; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.rail-scroll::-webkit-scrollbar { height: 6px; }
.rail-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.rail-scroll .pcard { min-width: 220px; scroll-snap-align: start; }

/* ==========================================================================
   PROMO BANNER
   ========================================================================== */
.promo { background: linear-gradient(120deg, var(--ink), var(--ink-2)); border-radius: var(--r-lg); padding: 34px 40px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; position: relative; }
.promo h3 { font-size: 24px; margin-bottom: 8px; }
.promo p { color: #c3c9d2; margin: 0; }
.promo .glow { position: absolute; inset-inline-start: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(225,29,42,.4), transparent 70%); }

/* ==========================================================================
   SUPPLIER BRANDS
   ========================================================================== */
.suppliers { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.supplier { background: #fff; border: 1px solid var(--line); border-radius: var(--r); height: 76px; display: grid; place-items: center; padding: 16px 20px; color: var(--muted); font-weight: 800; font-size: 16px; letter-spacing: .5px; transition: .2s; }
.supplier img { max-height: 34px; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .7; transition: .2s; }
.supplier:hover { border-color: var(--brand); color: var(--ink); }
.supplier:hover img { filter: grayscale(0); opacity: 1; }

/* ==========================================================================
   BLOG
   ========================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: .2s; }
.post:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.post-media { aspect-ratio: 16/9; background: linear-gradient(135deg, #dfe3e8, #eef0f3); position: relative; display: grid; place-items: center; color: var(--muted-2); overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 16px; }
.post-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 12px; margin-bottom: 8px; }
.post h4 { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.post:hover h4 { color: var(--brand); }
.post p { font-size: 13px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   NEWSLETTER + ENAMAD
   ========================================================================== */
.trust-band { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.newsletter { background: linear-gradient(120deg, var(--brand), var(--brand-dark)); border-radius: var(--r-lg); padding: 30px; color: #fff; }
.newsletter h3 { font-size: 20px; margin-bottom: 6px; }
.newsletter p { opacity: .9; margin: 0 0 16px; }
.newsletter form { display: flex; gap: 10px; background: rgba(255,255,255,.15); padding: 6px; border-radius: var(--r-sm); }
.newsletter input { flex: 1; border: 0; background: transparent; color: #fff; padding: 10px 14px; outline: none; }
.newsletter input::placeholder { color: rgba(255,255,255,.75); }
.newsletter .btn { background: #fff; color: var(--brand); }
.enamad-band { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: flex; align-items: center; justify-content: space-around; gap: 16px; }
.enamad-badge { text-align: center; }
.enamad-badge .box { width: 78px; height: 78px; border-radius: var(--r); border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted-2); margin: 0 auto 8px; }
.enamad-badge small { font-size: 11.5px; color: var(--muted); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--ink); color: #b6bcc6; margin-top: 44px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding: 44px 0 34px; }
.footer h5 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer a { color: #b6bcc6; font-size: 13.5px; display: block; padding: 5px 0; transition: .2s; }
.footer a:hover { color: #fff; padding-inline-start: 4px; }
.footer .about p { font-size: 13.5px; line-height: 1.9; margin: 0 0 16px; }
.foot-contact li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.foot-contact .svg { color: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: 12.5px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pay-icons { display: flex; gap: 8px; }
.pay-icons span { background: rgba(255,255,255,.08); border-radius: 6px; padding: 6px 10px; font-size: 11px; font-weight: 700; color: #d5d9e0; }
.social { display: flex; gap: 8px; }
.social a { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #d5d9e0; padding: 0; }
.social a:hover { background: var(--brand); color: #fff; }

/* ==========================================================================
   MOBILE NAV / DRAWER
   ========================================================================== */
.burger { display: none; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; color: var(--text); }
.burger:hover { background: var(--bg); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: .25s; z-index: 90; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; width: 86%; max-width: 340px; height: 100%; background: #fff; z-index: 95; transform: translateX(105%); transition: .28s ease; overflow-y: auto; box-shadow: var(--sh-3); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }
.drawer-nav a:hover { background: var(--bg); color: var(--brand); }

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 14px 0; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: var(--muted-2); }

/* ==========================================================================
   PRODUCT PAGE
   ========================================================================== */
.pdp { display: grid; grid-template-columns: 420px 1fr 300px; gap: 26px; align-items: start; }
.gallery { position: sticky; top: 88px; }
.gallery-main { border: 1px solid var(--line); border-radius: var(--r); aspect-ratio: 1; display: grid; place-items: center; background: #fff; position: relative; overflow: hidden; }
.gallery-main img, .gallery-main svg.part { width: 78%; height: 78%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gthumb { width: 66px; height: 66px; border: 1.5px solid var(--line); border-radius: 10px; display: grid; place-items: center; background: #fff; cursor: pointer; padding: 6px; transition: .2s; }
.gthumb.is-active, .gthumb:hover { border-color: var(--brand); }
.gthumb svg, .gthumb img { width: 100%; height: 100%; object-fit: contain; }

.pdp-brand { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.pdp-title { font-size: 22px; font-weight: 800; line-height: 1.5; margin-bottom: 6px; }
.pdp-en { font-size: 13px; color: var(--muted-2); margin-bottom: 14px; direction: ltr; text-align: right; }
.pdp-meta { display: flex; align-items: center; gap: 18px; padding: 12px 0; border-block: 1px solid var(--line-2); margin-bottom: 18px; flex-wrap: wrap; }
.pdp-meta .m { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pdp-meta .star { color: var(--star); }

.fit-picker { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 18px; }
.fit-picker h4 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.fit-options { display: flex; flex-wrap: wrap; gap: 8px; }

.feat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-bottom: 8px; }
.feat-list li { display: flex; gap: 8px; font-size: 13.5px; padding: 5px 0; }
.feat-list .svg { color: var(--green); flex-shrink: 0; }

/* Buy box */
.buybox { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; position: sticky; top: 88px; background: #fff; box-shadow: var(--sh-1); }
.buybox .seller { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
.buybox .seller b { color: var(--text); }
.buy-guarantee { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.buy-guarantee li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #4b5563; }
.buy-guarantee .svg { color: var(--brand); }
.buybox .price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.buybox .off-tag { background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.buybox .price-final { font-size: 22px; font-weight: 900; margin: 8px 0 16px; display: flex; align-items: baseline; gap: 5px; }
.buybox .price-final .cur { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 34px 0 22px; overflow-x: auto; }
.tab { padding: 12px 18px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec-table tr:nth-child(odd) { background: var(--bg); }
.spec-table th { text-align: right; padding: 13px 18px; width: 220px; color: var(--muted); font-weight: 600; font-size: 13.5px; vertical-align: top; }
.spec-table td { padding: 13px 18px; font-size: 13.5px; font-weight: 600; }

/* ==========================================================================
   CATEGORY / LISTING PAGE
   ========================================================================== */
.listing { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--r); position: sticky; top: 88px; overflow: hidden; }
.filter-block { padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.filter-block h4 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.filter-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; color: #4b5563; cursor: pointer; }
.filter-opt input { accent-color: var(--brand); width: 16px; height: 16px; }
.filter-opt .cnt { margin-inline-start: auto; font-size: 11.5px; color: var(--muted-2); }
.listing-top { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
#filterToggle { display: none; }
.sort-tabs { display: flex; gap: 4px; }
.sort-tab { padding: 8px 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; color: var(--muted); }
.sort-tab.is-active { background: var(--brand-tint); color: var(--brand); }
.listing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.applied-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.pagination a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination a:hover:not(.is-active) { border-color: var(--brand); color: var(--brand); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .brandpick-grid { grid-template-columns: repeat(6, 1fr); }
  .cats-grid { grid-template-columns: repeat(4, 1fr); }
  .prod-grid { grid-template-columns: repeat(4, 1fr); }
  .suppliers { grid-template-columns: repeat(5, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .service:nth-child(4) { border-inline-start: 0; }
  .pdp { grid-template-columns: 360px 1fr; }
  .buybox { grid-column: 1 / -1; position: static; }
}
/* Header collapses to the mobile drawer below 1024px to avoid nav cramming */
@media (max-width: 1024px) {
  .nav { display: none; }
  .burger { display: flex; }
  .hide-mobile { display: none !important; }
  .search { order: 3; max-width: none; flex-basis: 100%; margin-top: 12px; }
  .header-main { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .trust-band { grid-template-columns: 1fr; }
  .listing { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: block; }
  #filterToggle { display: inline-flex; }
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; }
}
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .burger { display: flex; }
  .nav { display: none; }
  .search { order: 3; max-width: none; flex-basis: 100%; margin-top: 10px; }
  .header-main { flex-wrap: wrap; }
  .brandpick-grid { grid-template-columns: repeat(4, 1fr); }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .prod-grid { display: none; }
  .rail-scroll { display: flex; }
  .suppliers { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service { border-inline-start: 0 !important; }
  .promo { flex-direction: column; text-align: center; padding: 26px; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-main { padding: 28px; min-height: 280px; }
  .hero-main h1 { font-size: 26px; }
  .sec-title { font-size: 17px; }
}
@media (max-width: 460px) {
  .brandpick-grid { grid-template-columns: repeat(3, 1fr); }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
