:root {
  --navy: #0B2239;
  --ink: #22364A;
  --muted: #4A5B6B;
  --line: #D9E0E6;
  --field: #8A99A8;
  --soft: #F4F6F8;
  --accent: #C2410C;
  --accent-dark: #9A3412;
  --ok: #0B2239;
  --white: #FFFFFF;
  --radius: 8px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.01em; }
h2 { font-size: 24px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1288px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--navy); color: var(--white); padding: 10px 14px; z-index: 50; border-radius: 6px; }
.skip:focus { top: 8px; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
html[lang="ar"] .mono { font-family: var(--font); }

/* Buttons */
.btn-primary, .btn-outline, .btn-light, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 6px; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary[aria-disabled="true"] { background: var(--field); border-color: var(--field); pointer-events: none; }
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--soft); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-ghost { color: var(--white); border-color: var(--white); background: transparent; }
.btn-lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn-link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--navy); text-decoration: underline; cursor: pointer; font-weight: 500; text-align: start; }

/* Top bar and header */
.topbar { background: var(--navy); color: var(--white); font-size: 14px; }
.topbar-in { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-block: 4px; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.country-label { display: inline-flex; align-items: center; gap: 8px; }
.country-label select { min-height: 36px; border-radius: 4px; border: 1px solid #5B7189; background: var(--navy); color: var(--white); padding: 0 8px; }
.lang-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--white); font-weight: 600; text-decoration: none; }
.lang-link:hover { text-decoration: underline; }
.demo-banner { background: #FFF4E5; color: #7A2E0A; border-bottom: 1px solid #F3D3B5; font-size: 14px; padding: 10px 0; }

.header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-block: 14px; }
.logo { font-size: 24px; font-weight: 700; color: var(--navy); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.logo span { color: var(--accent); }
.search { flex: 1 1 320px; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--field); border-start-start-radius: 6px; border-end-start-radius: 6px; border-inline-end: 0; background: var(--white); }
.search button { height: 48px; padding: 0 18px; border: 1px solid var(--navy); background: var(--navy); color: var(--white); font-weight: 600; border-start-end-radius: 6px; border-end-end-radius: 6px; cursor: pointer; }
.header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.header-actions .btn-outline.has-boat { background: var(--navy); color: var(--white); }
/* Department menu: no sideways scrolling, dropdowns on wide screens, one menu button on phones */
.catnav { position: relative; z-index: 15; font-size: 15px; font-weight: 600; }
.dnav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 8px; }
.dnav-item { position: relative; }
.dnav-link { display: inline-flex; align-items: center; min-height: 52px; padding: 0 12px; color: var(--navy); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.dnav-item:first-child .dnav-link { padding-inline-start: 0; }
.dnav-item:hover .dnav-link, .dnav-item:focus-within .dnav-link { border-bottom-color: currentColor; }
.dnav-drop { display: none; position: absolute; top: 100%; inset-inline-start: 0; min-width: 260px; padding: 10px 0; background: var(--white); border: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12); }
.dnav-item:hover .dnav-drop, .dnav-item:focus-within .dnav-drop { display: block; }
.dnav-drop ul { list-style: none; margin: 0; padding: 0; }
.dnav-drop a { display: block; padding: 10px 18px; color: var(--ink, #1B2836); font-weight: 500; text-decoration: none; white-space: nowrap; }
.dnav-drop a:hover, .dnav-drop a:focus { background: var(--soft); }
.mnav { display: none; }
.mnav-btn { display: flex; align-items: center; gap: 10px; min-height: 52px; font-weight: 700; cursor: pointer; list-style: none; }
.mnav-btn::-webkit-details-marker { display: none; }
.mnav-panel { display: flex; flex-direction: column; gap: 18px; padding-block: 8px 20px; }
.mnav-group { display: flex; flex-direction: column; }
.mnav-group a { padding: 9px 0; color: inherit; text-decoration: none; font-weight: 500; }
.mnav-group a.mnav-dept { font-weight: 800; font-size: 16px; }
@media (max-width: 900px), (hover: none) {
  .dnav { display: none; }
  .mnav { display: block; }
}

/* Home */
.hero { background: var(--soft); }
.hero-in { padding-block: 56px; }
.hero-copy { max-width: 680px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.hero-copy h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; }
.hero-copy p { margin: 0; font-size: 18px; }
.trust { border-bottom: 1px solid var(--line); }
.trust-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 40px; padding-block: 26px; }
.trust-in div { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.trust-in strong { color: var(--navy); font-size: 16px; }
.section { padding-block: 40px 8px; display: flex; flex-direction: column; gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; min-height: 104px; justify-content: space-between; }
.tile:hover { border-color: var(--navy); }
.tile-title { font-size: 17px; font-weight: 600; color: var(--navy); }
.tile-sub { font-size: 14px; color: var(--muted); }
.b2b { background: var(--navy); color: var(--white); margin-top: 48px; }
.b2b h2 { color: var(--white); font-size: 28px; }
.b2b-in { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: center; justify-content: space-between; padding-block: 48px; }
.b2b-in > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.b2b p { margin: 0; color: #D5DEE7; font-size: 17px; }
.b2b-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--white); }
.card:hover { border-color: var(--navy); }
.card[hidden] { display: none; }
.card-photo { aspect-ratio: 4 / 3; background: var(--soft); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.card-photo img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 16px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.price { font-size: 20px; font-weight: 700; color: var(--navy); margin-top: auto; }
.stock { font-size: 14px; }
.stock strong { color: var(--navy); }
.fit { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; font-size: 13px; font-weight: 600; border: 1px solid transparent; }
.fit[data-state="fits"] { background: var(--ok); color: var(--white); }
.fit[data-state="check"] { color: var(--accent); border-color: var(--accent); background: var(--white); }
.fit[data-state="nofit"] { color: var(--muted); border-color: var(--field); background: var(--soft); }
.fit[data-state="universal"] { color: var(--navy); border-color: var(--line); background: var(--soft); }

/* Listing */
.page { padding-block: 16px 56px; display: flex; flex-direction: column; gap: 22px; }
.page.narrow { max-width: 820px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: 14px; color: var(--muted); }
.crumbs a, .crumbs span[aria-current] { display: inline-flex; align-items: center; min-height: 40px; }
.crumbs span[aria-current] { color: var(--navy); font-weight: 600; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head p { margin: 0; }
.listing { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.filters { flex: 1 1 220px; max-width: 300px; display: flex; flex-direction: column; gap: 20px; }
.filters fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; }
.filters legend { font-weight: 600; color: var(--navy); margin-bottom: 4px; padding: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.results { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sort { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.sort select, .qty select, .garage select, .garage input { min-height: 44px; border: 1px solid var(--field); border-radius: 6px; padding: 0 10px; background: var(--white); }
.empty { padding: 20px; background: var(--soft); border-radius: var(--radius); margin: 0; }
@media (max-width: 640px) { .filters { max-width: none; } }

/* Product page */
.product { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.gallery { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery-main { aspect-ratio: 1 / 1; max-height: 560px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.thumbs img { aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.buy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.lead { margin: 0; font-size: 17px; }
.fitbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--soft); font-size: 15px; }
.fitbox[data-state="fits"] { background: var(--ok); color: var(--white); }
.fitbox[data-state="fits"] .btn-link { color: var(--white); }
.fitbox[data-state="check"] { background: var(--white); border: 1px solid var(--accent); }
.fitbox[data-state="check"] .js-fitbox-text strong { color: var(--accent); }
.fitbox[data-state="nofit"] { background: var(--white); border: 1px solid var(--field); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.facts li { display: flex; flex-direction: column; font-size: 15px; }
.facts span { font-size: 13px; color: var(--muted); }
.facts strong { color: var(--navy); }
.pricebox { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--soft); border-radius: var(--radius); font-size: 15px; }
.price-big { font-size: 36px; line-height: 1.1; font-weight: 700; color: var(--navy); }
.buyrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.buyrow .btn-primary, .buyrow .btn-outline { flex: 1 1 180px; }
.qty { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--navy); }
.qty select { min-height: 52px; min-width: 84px; }
.added { margin: 0; font-weight: 600; color: var(--navy); }
.details { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.details section { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); width: 45%; padding-inline-end: 16px; }
td { color: var(--navy); }

/* Cart */
.cart { display: flex; flex-direction: column; gap: 18px; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cart-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line .thumb { width: 72px; height: 72px; flex: none; background: var(--soft); border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-line .info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.cart-line .info a { font-weight: 600; color: var(--navy); text-decoration: none; }
.cart-line .line-price { font-weight: 700; color: var(--navy); min-width: 110px; text-align: end; }
.cart-line select { min-height: 44px; border: 1px solid var(--field); border-radius: 6px; padding: 0 8px; }
.totals { margin: 0; display: flex; flex-direction: column; gap: 8px; max-width: 420px; margin-inline-start: auto; width: 100%; }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; color: var(--navy); }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; font-size: 20px; }
.totals .grand dt { color: var(--navy); font-weight: 700; }
.note { margin: 0; font-size: 14px; color: var(--muted); }
.warn { margin: 0; padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--radius); color: var(--ink); }
.cart .btn-primary { align-self: flex-end; }

/* Garage dialog */
.garage { border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(11, 34, 57, 0.3); }
.garage::backdrop { background: rgba(11, 34, 57, 0.5); }
.garage-form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.garage label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--navy); font-size: 14px; }
.garage input, .garage select { width: 100%; font-weight: 400; color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.garage-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }

/* Footer */
.footer { background: var(--soft); margin-top: 56px; font-size: 15px; }
.b2b + .footer { margin-top: 0; }
.footer-in { display: flex; flex-wrap: wrap; gap: 28px 48px; padding-block: 44px 32px; }
.footer-in > div { flex: 1 1 160px; display: flex; flex-direction: column; }
.footer-in .footer-brand { flex: 2 1 280px; gap: 8px; }
.footer-brand p { margin: 0; }
.footer h2 { font-size: 15px; margin-bottom: 4px; }
.footer a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Photography-led sections ---------- */
.hero-photo { position: relative; min-height: clamp(480px, 74vh, 760px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--navy); }
.hero-img, .band > img, .b2b-photo > img, .cat-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 34, 0.15) 0%, rgba(6, 20, 34, 0.35) 45%, rgba(6, 20, 34, 0.82) 100%); }
.hero-content { position: relative; width: 100%; padding-block: 64px 56px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.hero-content h1 { color: var(--white); font-size: clamp(36px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.02em; max-width: 14ch; text-wrap: balance; }
html[lang="ar"] .hero-content h1 { letter-spacing: 0; line-height: 1.25; max-width: 18ch; }
.hero-lead { margin: 0; font-size: clamp(17px, 2vw, 20px); max-width: 560px; color: #E6EDF3; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #FDBA8C; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.stats { background: var(--navy); color: var(--white); }
.stats-in { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; padding-block: 0; }
.stats-in li { padding: 18px 0; font-weight: 600; font-size: 15px; border-inline-start: 1px solid rgba(255, 255, 255, 0.18); padding-inline-start: 18px; }
.stats-in li:first-child { border-inline-start: 0; padding-inline-start: 0; }

.showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.showcase-card { position: relative; display: block; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--white); background: var(--navy); }
.showcase-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.showcase-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 34, 0) 35%, rgba(6, 20, 34, 0.85) 100%); }
.showcase-card:hover img { transform: scale(1.04); }
.showcase-text { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.showcase-title { font-size: 22px; font-weight: 700; line-height: 1.2; }
.showcase-sub { font-size: 15px; color: #E6EDF3; }
.showcase-cta { margin-top: 6px; align-self: flex-start; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 4px; background: var(--white); color: var(--navy); }
.showcase-card.is-request .showcase-cta { background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.8); }

.band, .b2b-photo, .cat-banner { position: relative; overflow: hidden; color: var(--white); background: var(--navy); }
.band { margin-top: 56px; }
.band-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 20, 34, 0.85) 0%, rgba(6, 20, 34, 0.55) 50%, rgba(6, 20, 34, 0.15) 100%); }
html[dir="rtl"] .band-shade { background: linear-gradient(270deg, rgba(6, 20, 34, 0.85) 0%, rgba(6, 20, 34, 0.55) 50%, rgba(6, 20, 34, 0.15) 100%); }
.band-content { position: relative; padding-block: 96px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.band-content h2, .b2b-photo h2, .cat-banner h1 { color: var(--white); }
.band-content h2 { font-size: clamp(30px, 4vw, 44px); max-width: 16ch; }
.band-content p { margin: 0; max-width: 520px; font-size: 18px; color: #E6EDF3; }
.b2b-photo { margin-top: 0; }
.b2b-photo .b2b-in { position: relative; padding-block: 72px; }
.cat-banner { min-height: 260px; display: flex; align-items: flex-end; }
.cat-banner-in { position: relative; width: 100%; padding-block: 24px 32px; display: flex; flex-direction: column; gap: 8px; }
.cat-banner .crumbs, .cat-banner .crumbs span[aria-current] { color: #E6EDF3; }
.cat-banner .crumbs a { color: var(--white); }
.trust { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .showcase-card img { transition: none; } .showcase-card:hover img { transform: none; } }
@media (max-width: 640px) {
  .hero-photo { min-height: 560px; }
  .stats-in li { border-inline-start: 0; padding-inline-start: 0; padding-block: 10px; }
  .band-content { padding-block: 64px; }
  .showcase-card { aspect-ratio: 4 / 3; }
}

/* ---- UX review fixes ---- */
[hidden] { display: none !important; }
.card-photo { overflow: hidden; }
.card-photo img { min-height: 0; max-height: 100%; }
.card-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Product: about section */
.about p { max-width: 70ch; margin: 0 0 12px; line-height: 1.65; }
.features { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 28px; }
.features li { position: relative; padding-inline-start: 26px; line-height: 1.5; }
.features li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.35em; width: 14px; height: 8px; border-inline-start: 2px solid var(--ok, #0F6B4F); border-bottom: 2px solid var(--ok, #0F6B4F); transform: rotate(-45deg); }
.details { display: flex; flex-direction: column; gap: 36px; }
/* Filters: always open on wide screens, a toggle on phones */
.filters-toggle { display: none; }
@media (max-width: 640px) {
  .filters-toggle { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; cursor: pointer; list-style: none; }
  .filters-toggle::-webkit-details-marker { display: none; }
  .filters-wrap[open] .filters { margin-top: 12px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .card-body { padding: 10px; gap: 4px; }
  .card-title { font-size: 14px; }
  .card .price, .card .is-quote { font-size: 16px; }
  .card .stock { font-size: 12px; }
}
.details section { flex: none; }
.details .table-wrap table { max-width: 820px; }
.opts { font-size: 12px; font-weight: 700; color: var(--muted); }
.variants { display: flex; flex-direction: column; gap: 8px; }
.variants-h { margin: 0; font-weight: 700; }
.variants table { width: 100%; font-size: 14px; border-collapse: collapse; }
.variants th, .variants td { padding: 8px 10px; text-align: start; border-bottom: 1px solid var(--line); }
.variants th { font-size: 12px; color: var(--muted); font-weight: 600; }
.variants tr.is-current td { background: var(--soft); font-weight: 700; }
.variants td a { color: inherit; }
.variants .vp { white-space: nowrap; }
.variants .table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
/* Phone header for the Coastal and Horizon designs */
@media (max-width: 640px) {
  .topbar-in > :not(.topbar-actions) { display: none; }
  .topbar-in { justify-content: flex-end; min-height: 40px; }
  .topbar-actions { flex-wrap: nowrap; }
  .header-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-block: 10px; }
  .header-in .search { grid-column: 1 / -1; grid-row: 2; }
  .header-actions { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 6px; }
  .header-actions > * { min-height: 40px; padding-inline: 12px; font-size: 13px; }
}
.details { flex-wrap: nowrap; }
@media (max-width: 640px) { .theme-horizon .logo { font-size: 16px; letter-spacing: 0.1em; } .logo { font-size: 18px; } }
.thumb-btn { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.thumb-btn.is-on { border-color: var(--navy); }
.thumb-btn img { width: 100%; display: block; }

/* ---- Marketplace upgrades shared by every design ---- */
.card-title .cb { font-weight: 800; }
.card .stock::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #0F6B4F); margin-inline-end: 6px; vertical-align: middle; }
.pbrand { display: inline-block; font-size: 14px; text-decoration: none; }
.subchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.subchip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: 14px; background: var(--white); }
.subchip:hover { border-color: var(--navy); }
.subchip small { color: var(--muted); font-weight: 500; }
.tree-a { display: block; padding: 6px 0; text-decoration: none; color: inherit; }
.pnav { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 32px; padding: 0 2px; background: var(--white); border-bottom: 2px solid var(--line); }
.pnav a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--navy); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.pnav a:hover { border-bottom-color: currentColor; }
.details { border-top: 0; }
.specgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.specgrid > div { padding: 12px 16px; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); margin: -1px -1px 0 0; }
.specgrid dt { font-size: 13px; color: var(--muted); }
.specgrid dd { margin: 2px 0 0; font-weight: 700; color: var(--ink, #1B2836); }
.dlv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.dlv li { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.dlv li svg { flex: none; color: var(--navy); }
.dlv li span { display: flex; flex-direction: column; gap: 2px; }
.dlv small { color: var(--muted); }
section[id] { scroll-margin-top: 60px; }
.preview-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: #FFF4EC; color: #7A3300; font-size: 14px; }
