/* DirhamScan — one quiet look (charcoal on white, Google-like greys, the buy buttons in red), the same family as the
   owner's Dentiyab site. Written with logical properties only (inline-start/end), so English (LTR) and Arabic (RTL)
   share every rule. Dark colours when the visitor picks them (data-theme on <html>). */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn.f6d31671339d.woff2") format("woff2"); font-weight: 100 900;
  font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fff; --surface: #fff; --panel: #fff; --input: #f1f3f4; --line: #dadce0; --text: #202124; --muted: #5f6368;
  --muted-2: #3c4043; --blue: #1a0dab; --soft: #f1f3f4; --chip-text: #3c4043; --shadow: #20212429;
  --buy: #db192b; --buy-hover: #b8121f; --band: #ef4056; --good: #137333; --warn-bg: #fff4e5; --warn-ink: #7a4b00;
  --radius: 12px; --sticky-h: 107px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #202124; --surface: #292a2d; --panel: #292a2d; --input: #303134; --line: #3c4043; --text: #e8eaed;
  --muted: #9aa0a6; --muted-2: #bdc1c6; --blue: #8ab4f8; --soft: #303134; --chip-text: #e8eaed; --shadow: #0000004d;
  --band: #8f2433; --good: #81c995; --warn-bg: #3a2a10; --warn-ink: #ffd699;
}
@media (max-width: 760px) { :root { --sticky-h: 99px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 "Vazirmatn", Tahoma, system-ui, sans-serif;
  padding-block-end: env(safe-area-inset-bottom); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.5; }
.muted { color: var(--muted); }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip: auto; inset-inline-start: 8px; top: 8px; z-index: 99; background: var(--bg);
  padding: 6px 10px; border-radius: 8px; }
.icon { width: 20px; height: 20px; flex: none; }
[dir="rtl"] .icon-chevron { transform: scaleX(-1); }
.empty { color: var(--muted); padding: 24px 0; }
.primary, a.primary, button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--buy); border: 1px solid var(--buy); color: #fff; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 14px; }
.primary:hover { background: var(--buy-hover); border-color: var(--buy-hover); }
.ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14px; }
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 16px 20px 32px; }
.page-heading { font-size: 20px; margin: 4px 0 8px; }
.section-title { font-size: 17px; margin: 28px 0 10px; }

/* Header: sticky on every page; logo, a round search with the magnifier at its end, the tools */
.top { position: sticky; top: 0; z-index: 40; background: var(--bg); border-block-end: 1px solid var(--line); }
.top-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.wordmark { display: flex; align-items: center; flex-shrink: 0; height: 44px; }
.wordmark-text { font-weight: 800; font-size: 25px; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.wordmark-text b { font-weight: 800; color: var(--buy); }
.phone-mark { display: none; }
.searchbar { flex: 1; min-width: 0; max-width: 690px; height: 46px; display: flex; align-items: center; border: 1px solid var(--line);
  border-radius: 24px; background: var(--bg); transition: box-shadow .15s; }
.searchbar:hover, .searchbar:focus-within { box-shadow: 0 1px 6px var(--shadow); border-color: transparent; }
:root[data-theme="dark"] .searchbar { background: var(--input); border-color: transparent; }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15px;
  padding: 0 18px; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchbar button { width: 46px; height: 44px; display: grid; place-items: center; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; padding: 0; border-start-end-radius: 24px; border-end-end-radius: 24px; }
.searchbar button .icon { width: 21px; height: 21px; }
.top-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; margin-inline-start: auto; }
.tool-link, .theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.tool-link:hover, .theme-toggle:hover { background: var(--soft); color: var(--text); }
.tool-link .icon, .theme-toggle svg { width: 21px; height: 21px; }
.lang-link { font-size: 13px; font-weight: 600; width: auto; min-width: 40px; padding: 0 8px; border-radius: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* Group row under the search, with the mega menu on wide screens */
.cat-strip { position: relative; display: flex; align-items: stretch; max-width: 1640px; margin: 0 auto; background: var(--bg); }
.cat-strip-inner { flex: 1; min-width: 0; display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: none;
  scroll-behavior: smooth; justify-content: flex-start; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.cat-strip-inner::-webkit-scrollbar { display: none; }
.cat-strip a { flex: 0 0 auto; padding: 8px 10px 9px; font-size: 13px; color: var(--muted); white-space: nowrap;
  border-block-end: 2px solid transparent; }
.cat-strip a:hover { color: var(--text); }
.cat-strip a[aria-current="page"] { color: var(--text); border-block-end-color: var(--text); font-weight: 600; }
.cat-menu-link, .cat-menu-button { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.cat-menu-link .icon, .cat-menu-button .icon { width: 18px; height: 18px; }
.cat-extra { color: var(--muted-2) !important; }
.cat-arrow { position: absolute; top: 0; bottom: 2px; z-index: 2; width: 44px; display: grid; place-items: center; border: 0;
  padding: 0; cursor: pointer; color: var(--text); background: transparent; }
.cat-arrow[hidden] { display: none; }
.cat-arrow .icon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 1px 4px var(--shadow); }
.cat-more { inset-inline-end: 0; }
.cat-back { inset-inline-start: 0; }
.cat-back .icon { transform: scaleX(-1); }
[dir="rtl"] .cat-back .icon { transform: none; }
@media (hover: none) { .cat-arrow { display: none !important; } }

.cat-menu { flex: 0 0 auto; position: static; }
.cat-menu > summary { list-style: none; cursor: pointer; padding: 8px 12px 9px; white-space: nowrap; font-size: 13.5px;
  border-block-end: 2px solid transparent; display: flex; align-items: center; }
.cat-menu > summary::-webkit-details-marker { display: none; }
.cat-menu[open] > summary, .cat-menu > summary:hover { border-block-end-color: var(--buy); color: var(--buy); }
.cat-menu > summary::after { content: ""; width: 1px; height: 18px; background: var(--line); margin-inline-start: 12px; }
.cat-menu .mega-content { position: absolute; top: 100%; inset-inline: 0; margin: 0 auto; max-width: 1200px; background: var(--bg);
  border: 1px solid var(--line); border-block-start: 0; border-end-start-radius: 14px; border-end-end-radius: 14px;
  box-shadow: 0 14px 30px var(--shadow); z-index: 70; overflow: hidden; }
.cat-menu .mega-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: min(520px, calc(100dvh - 190px)); }
.cat-menu .mega-tabs { background: var(--soft); overflow-y: auto; border-inline-end: 1px solid var(--line); padding: 6px 0; }
.cat-menu .mega-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 11px 16px;
  border: 0; border-inline-start: 3px solid transparent; background: transparent; text-align: start; font-size: 13.5px;
  line-height: 1.7; cursor: pointer; }
.cat-menu .mega-tab .icon { width: 12px; height: 12px; color: var(--muted); }
.cat-menu .mega-tab[aria-selected="true"] { background: var(--bg); border-inline-start-color: var(--buy); color: var(--buy); font-weight: 600; }
.cat-menu .mega-panel { height: 100%; overflow-y: auto; padding: 16px 24px; }
.cat-menu .mega-panel[hidden] { display: none; }
.all-category { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--blue); }
.all-category .icon { width: 14px; height: 14px; }
.cat-menu .category-sections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; margin-top: 14px; }
.cat-menu .category-section h2 { font-size: 13.5px; margin: 0 0 6px; padding-inline-start: 8px; border-inline-start: 2px solid var(--buy); }
.cat-menu .subcategory-links { display: flex; flex-direction: column; }
.cat-menu .subcategory-links a { padding: 4px 0; font-size: 12.5px; color: var(--muted-2); border: 0; white-space: normal; }
.cat-menu .subcategory-links a:hover { color: var(--buy); }
@media (min-width: 761px) {
  .cat-menu-link, .cat-group { display: none !important; }
}
@media (max-width: 760px) {
  .cat-menu { display: none; }
  .cat-menu-link { padding-inline-end: 12px !important; border-inline-end: 1px solid var(--line); margin-inline-end: 4px; }
  .cat-extra { color: var(--buy) !important; font-weight: 500; }
  .cat-group + .cat-extra { border-inline-start: 1px solid var(--line); margin-inline-start: 6px; padding-inline-start: 14px !important; }
}

/* Home: the logo and one big round search in the middle; the sticky header appears once the search scrolled away */
.home-page .top { position: fixed; inset-inline: 0; top: 0; visibility: hidden; transform: translateY(-110%);
  transition: transform .18s ease, visibility .18s; }
.home-page.top-on .top { visibility: visible; transform: none; }
.home-hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: clamp(64px, 10vh, 110px) 16px 8px;
  text-align: center; }
.hero-tools { position: absolute; top: 10px; inset-inline-end: 16px; margin: 0; }
.hero-logo { margin: 0 0 12px; line-height: 1; }
.hero-logo .wordmark-text { font-size: 58px; }
.hero-tagline { margin: 0 0 24px; font-size: 15px; color: var(--muted-2); font-weight: 500; }
.hero-search { flex: 0 0 auto; width: 100%; max-width: 584px; height: 50px; border-radius: 25px; }
.hero-search input { font-size: 16px; padding: 0 20px; }
.hero-search .hero-go { width: 48px; height: 48px; }
.chip-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px auto 0; max-width: 640px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--chip-text); font-size: 12.5px; white-space: nowrap; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip small { color: var(--muted); }
.home-pitch { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); }
.home-pitch b { color: var(--text); }
@media (min-width: 761px) {
  .home-hero .cat-strip { position: absolute; top: 8px; inset-inline-start: 16px; margin: 0; background: transparent; }
  .home-hero .cat-strip-inner { overflow: visible; }
  .home-hero .cat-arrow { display: none !important; }
  .home-hero .cat-menu .mega-content { position: absolute; top: 100%; inset-inline-start: 0; inset-inline-end: auto;
    width: min(1200px, calc(100vw - 32px)); margin: 0; text-align: start; }
}
@media (max-width: 760px) {
  .home-hero { padding: 11vh 16px 8px; }
  .hero-tools { inset-inline-end: 8px; top: 4px; }
  .hero-logo .wordmark-text { font-size: 42px; }
  .hero-logo { margin-bottom: 18px; }
  .hero-search { height: 48px; }
  .chip-strip { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: 100%; scrollbar-width: none; }
  .chip-strip::-webkit-scrollbar { display: none; }
  .home-hero .cat-strip { position: absolute; top: 2px; inset-inline-start: 6px; margin: 0; background: transparent; }
  .home-hero .cat-strip-inner { overflow: visible; padding: 0; gap: 0; }
  .home-hero .cat-strip .cat-group, .home-hero .cat-strip .cat-extra, .home-hero .cat-strip .cat-arrow { display: none !important; }
  .home-hero .cat-menu-link { width: 44px; height: 44px; padding: 0 !important; margin: 0 !important; border: 0 !important; display: grid;
    place-items: center; }
  .home-hero .cat-menu-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .home-hero .cat-menu-link .icon { width: 26px; height: 26px; }
}

/* Shelves: a heading, a row that scrolls sideways, round arrows on wide screens */
.shelf { max-width: 1248px; margin: 26px auto 0; padding: 0 16px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { font-size: 19px; font-weight: 650; margin: 0; }
.section-heading p { margin: 0; font-size: 13px; }
.section-heading a { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--blue); white-space: nowrap; }
.section-heading a .icon { width: 14px; height: 14px; }
.shelf-frame { position: relative; }
.shelf-products { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 12px; overflow-x: auto; padding: 2px 2px 10px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.shelf-arrow { position: absolute; top: 45%; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); box-shadow: 0 2px 10px var(--shadow); display: grid; place-items: center; padding: 8px; cursor: pointer; }
.shelf-arrow[hidden] { display: none; }
.shelf-next { inset-inline-end: -8px; }
.shelf-prev { inset-inline-start: -8px; }
.shelf-prev .icon { transform: scaleX(-1); }
[dir="rtl"] .shelf-prev .icon { transform: none; }
@media (hover: none) { .shelf-arrow { display: none !important; } }
@media (max-width: 760px) { .shelf-products { grid-auto-columns: 172px; gap: 10px; } .shelf { margin-top: 20px; padding: 0 10px; } }

.deals-band { max-width: 1248px; margin: 26px auto 0; padding: 18px 16px; border-radius: 16px; background: var(--band); color: #fff; }
.deals-band .section-heading h2, .deals-band .section-heading p, .deals-band .section-heading a { color: #fff; }
.deals-band .shelf-arrow { color: #202124; background: #fff; }
@media (max-width: 760px) { .deals-band { margin-inline: 10px; padding: 14px 10px; } }

/* Product card */
.card { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); }
.card:hover { box-shadow: 0 1px 6px var(--shadow); }
.card-link { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.product-image { position: relative; height: 210px; padding: 10px; background: #fff; border-start-start-radius: 11px;
  border-start-end-radius: 11px; display: grid; place-items: center; overflow: hidden; }
.product-image img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.product-image-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #dadce0; }
.product-image-fallback .icon { width: 44px; height: 44px; }
.card-copy { display: flex; flex-direction: column; flex: 1; padding: 12px 13px 12px; }
.card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 450; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-option { margin: 0 0 6px; font-size: 12.5px; color: var(--muted-2); }
.card .price { margin: auto 0 6px; font-size: 12px; color: var(--muted); }
.card .price b { font-size: 16px; font-weight: 700; color: var(--text); }
.card-bottom { display: flex; align-items: center; justify-content: flex-end; min-height: 28px; padding-inline-end: 0; }
.card-bottom span { padding: 1px 10px; border-radius: 999px; background: var(--soft); color: var(--muted-2); font-size: 12.5px; }
.card-save { position: absolute; inset-inline-start: 8px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.card-save:hover { background: var(--soft); }
.card-save.on, .action-button.on { color: var(--buy); }
.card-save.on .icon, .action-button.on .icon { fill: var(--buy); }
.deal-card .deal-badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; background: var(--buy); color: #fff;
  font-size: 12px; font-weight: 650; padding: 2px 10px; border-radius: 999px; }
.deal-card .price { margin-top: 0; }
.deal-proof { margin: 2px 0 0; font-size: 11.5px; font-weight: 600; color: var(--good); }
.deal-was { margin: 4px 0 30px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.deal-was span { color: var(--text); font-weight: 500; }
@media (max-width: 760px) { .product-image { height: 160px; } .card h3 { font-size: 14px; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Stores and brands rows */
.logo-row, .brand-row { display: grid; grid-auto-flow: column; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.logo-row::-webkit-scrollbar, .brand-row::-webkit-scrollbar { display: none; }
.logo-row { grid-auto-columns: 96px; }
.logo-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.logo-circle { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center;
  overflow: hidden; font-size: 26px; color: var(--muted); flex: none; }
.logo-circle img { width: 56px; height: 56px; object-fit: contain; }
.logo-tile:hover .logo-circle { border-color: var(--text); }
.logo-tile strong { font-size: 12px; font-weight: 500; line-height: 1.6; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-tile small, .brand-tile small { font-size: 11px; color: var(--muted); }
.brand-row { grid-auto-columns: 150px; grid-template-rows: repeat(2, auto); }
.brand-tile { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 64px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); min-width: 0; }
.brand-tile:hover { border-color: var(--text); }
.brand-tile strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.store-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.store-tile:hover { border-color: var(--text); }
.store-tile > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.store-tile small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.store-tile .logo-circle { width: 56px; height: 56px; font-size: 22px; }
.store-head { display: flex; gap: 14px; align-items: center; margin: 10px 0 14px; }
@media (max-width: 699px) { .logo-row { grid-auto-columns: 80px; gap: 8px; } .logo-circle { width: 64px; height: 64px; }
  .brand-row { grid-auto-columns: 128px; gap: 8px; } .brand-tile { height: 58px; padding: 6px 10px; } }

/* Listing: filters at the side, title and sort, sub-group chips, the grid */
.listing-page { max-width: 1240px; margin: 0 auto; padding: 10px 16px 32px; }
.breadcrumbs { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; overflow-wrap: anywhere; }
.breadcrumbs a:hover { color: var(--text); }
.listing { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.listing > * { min-width: 0; }
.filters { position: sticky; top: calc(var(--sticky-h) + 10px); }
.filter-box { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--surface); }
.filter-box > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 600; font-size: 14px; cursor: pointer; }
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box form { padding-bottom: 14px; }
.filter-actions { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.filter-apply-top { flex: 1; white-space: nowrap; }
.filter-reset { font-size: 13px; color: var(--muted-2); white-space: nowrap; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; padding: 0; border: 0; font-size: 13px; color: var(--muted-2); }
.field legend { padding: 0; margin-bottom: 4px; }
.field select, .field input:not([type="checkbox"]), .sort-form select { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--input);
  padding: 0 10px; font-size: 14px; color: var(--text); width: 100%; }
.check-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); min-height: 32px; }
.check small { color: var(--muted); margin-inline-start: auto; }
.listing-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.listing-toolbar h1 { font-size: 20px; margin: 0; }
.listing-toolbar p { margin: 0; font-size: 12.5px; }
.sort-form select { width: auto; min-width: 150px; background: var(--bg); }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.load-more { display: flex; align-items: center; justify-content: center; margin: 18px auto 8px; min-width: 220px; max-width: 320px; height: 46px;
  border: 1px solid var(--line); border-radius: 24px; font-size: 14px; font-weight: 600; }
.load-more:hover { background: var(--soft); }
.pager { display: flex; justify-content: center; gap: 14px; align-items: center; margin: 10px 0; font-size: 13px; color: var(--muted); }
.pager a { color: var(--blue); }
.js .pager { display: none; }
.price-list { margin-top: 28px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.price-list h2 { font-size: 16px; margin: 0 0 10px; }
.price-list table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-list th { text-align: start; font-weight: 600; color: var(--muted-2); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.price-list td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.price-list td:not(:first-child), .price-list th:not(:first-child) { white-space: nowrap; text-align: end; }
@media (max-width: 760px) {
  .listing { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .filters { position: static; }
  .listing-toolbar { flex-direction: column; align-items: stretch; }
  .sort-form select { width: 100%; }
  .topic-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .topic-chips::-webkit-scrollbar { display: none; }
}

/* Product page */
.detail-wrap { max-width: 1240px; margin: 0 auto; padding: 10px 16px 32px; }
.product-box { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; padding: 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); }
.product-gallery { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; }
.product-gallery img { position: relative; z-index: 1; max-width: 86%; max-height: 86%; object-fit: contain; }
.product-info { min-width: 0; display: flex; flex-direction: column; }
.brand-link { color: var(--blue); font-size: 13px; }
.product-info h1 { font-size: 22px; margin: 2px 0 8px; overflow-wrap: anywhere; }
.product-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.action-button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg); font-size: 12.5px; cursor: pointer; }
.action-button .icon { width: 16px; height: 16px; }
.action-button.card-save { position: static; width: auto; }
.price-range { margin: 0; font-size: 14px; color: var(--muted-2); }
.price-range b { font-size: 24px; color: var(--text); }
.summary-stores { margin: 0 0 6px; font-size: 13px; color: var(--muted-2); }
.option-chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px 0 4px; padding-bottom: 4px; }
.option-chips::-webkit-scrollbar { display: none; }
.option-chip { flex: 0 0 auto; min-width: 104px; max-width: 220px; display: flex; flex-direction: column; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.6; }
.option-chip small { color: var(--muted); font-size: 11.5px; }
.option-chip.on { border: 2px solid var(--text); padding: 5px 11px; font-weight: 600; }
.choice-summary { margin: 6px 0; font-size: 13px; color: var(--muted-2); }
.best-offer { position: relative; display: flex; flex-direction: column; margin: 14px 0 0; padding: 14px 16px; border-radius: 12px;
  background: var(--buy); color: #fff; }
.best-offer:hover { background: var(--buy-hover); }
.best-offer .best-store { font-size: 12.5px; opacity: .95; }
.best-offer b { font-size: 20px; }
.best-offer .best-option { font-size: 12px; opacity: .9; }
.best-offer em { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11.5px;
  padding: 2px 10px; border-radius: 999px; background: #ffffff2e; }
.price-doubt { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13px; line-height: 1.8; }
.seller-section, .chart-box { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.seller-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.seller-head h2 { font-size: 17px; margin: 0; }
.seller-head span { font-size: 12.5px; color: var(--muted-2); }
.sellers { list-style: none; margin: 0; padding: 0; }
.seller { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 0;
  border-bottom: 1px solid var(--line); }
.seller:last-child { border-bottom: 0; }
.js .seller.more { display: none; }
.js .sellers.all .seller.more { display: grid; }
.seller-logo { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center;
  overflow: hidden; font-weight: 700; color: var(--muted); }
.seller-logo img { width: 34px; height: 34px; object-fit: contain; }
.seller-main { display: flex; flex-direction: column; min-width: 0; }
.seller-name { font-weight: 600; font-size: 14.5px; }
.seller-domain, .checked-at { font-size: 12px; color: var(--muted); }
.seller-package { font-size: 12.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-price { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); white-space: nowrap; }
.seller-price b { font-size: 17px; color: var(--text); }
.seller-price s { font-size: 11.5px; }
.in-stock { color: var(--good); font-size: 12px; }
.buy { min-width: 132px; }
.buy .icon { width: 16px; height: 16px; }
.show-all { width: 100%; margin-top: 12px; height: 44px; }
.fold { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; background: var(--surface); }
.fold > summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14.5px; }
.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 4px 0 14px; font-size: 13.5px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.chart { margin: 10px 0 0; }
.chart svg { width: 100%; height: 190px; display: block; }
.chart-area { fill: var(--buy); opacity: .09; }
.chart-line { fill: none; stroke: var(--buy); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--buy); stroke: var(--panel); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart figcaption { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.chart-legend { font-size: 13px; color: var(--muted-2); margin: 8px 0 0; }
.similar .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (max-width: 760px) {
  .product-box { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 14px; }
  .product-gallery { aspect-ratio: 4 / 3; }
  .product-info h1 { font-size: 18px; }
  .seller { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .seller .buy { grid-column: 1 / -1; width: 100%; }
  .seller-logo { width: 40px; height: 40px; }
  .similar .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* /categories/: a grey rail of groups, the chosen group's sections as rows that open */
.category-browser { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1200px; margin: 0 auto; align-items: start; }
.category-rail { position: sticky; top: var(--sticky-h); max-height: calc(100dvh - var(--sticky-h)); overflow-y: auto; background: var(--soft);
  border-inline-end: 1px solid var(--line); }
.category-rail > a { display: block; padding: 16px 12px; font-size: 13.5px; line-height: 1.7; color: var(--muted-2); text-align: center;
  border-bottom: 1px solid var(--line); }
.category-rail .selected { background: var(--bg); color: var(--text); font-weight: 700; box-shadow: inset 3px 0 0 var(--buy); }
[dir="rtl"] .category-rail .selected { box-shadow: inset -3px 0 0 var(--buy); }
.category-body { padding: 12px 16px 32px; min-width: 0; }
.cat-acc-title { font-size: 17px; margin: 4px 0 6px; }
.cat-acc-top { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.cat-acc-top .icon, .cat-acc-all .icon { width: 14px; height: 14px; }
.cat-acc { border-top: 1px solid var(--line); }
.cat-acc-row { border-bottom: 1px solid var(--line); display: block; }
.cat-acc-row > summary, .cat-acc-link { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 56px; padding: 14px 2px; cursor: pointer; font-size: 14px; font-weight: 600; }
.cat-acc-row > summary::-webkit-details-marker { display: none; }
.cat-acc-row > summary .icon { width: 18px; height: 18px; color: var(--muted-2); transform: rotate(90deg); transition: transform .15s; }
.cat-acc-row[open] > summary .icon { transform: rotate(-90deg); }
.cat-acc-link .icon { width: 16px; height: 16px; color: var(--muted-2); }
.cat-acc-list { display: flex; flex-direction: column; padding: 0 2px 10px; }
.cat-acc-list > a { display: flex; justify-content: space-between; padding: 10px 12px; font-size: 13.5px; color: var(--muted-2); border-radius: 6px; }
.cat-acc-list > a small { color: var(--muted); }
.cat-acc-list > a:hover { background: var(--soft); color: var(--text); }
.cat-acc-list > .cat-acc-all { display: inline-flex; justify-content: flex-start; gap: 4px; color: var(--blue); font-weight: 600; }
@media (max-width: 760px) {
  .category-browser { grid-template-columns: 96px minmax(0, 1fr); }
  .category-rail > a { font-size: 12px; padding: 14px 6px; }
  .category-body { padding: 10px 12px 28px; }
  .categories-page .cat-strip .cat-group { display: none !important; }
}

/* About, terms */
.prose { max-width: 820px; }
.prose h2 { font-size: 17px; margin: 22px 0 6px; }
.prose li { margin: 4px 0; }
.prose pre, .prose code { font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.prose pre { background: var(--soft); padding: 12px; border-radius: 10px; }
.deal-explain { font-size: 13px; color: var(--muted-2); line-height: 1.8; margin: 0 0 14px; }

/* Footer */
.site-footer { margin-top: 40px; padding: 28px 24px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-columns { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.footer-columns > div { display: flex; flex-direction: column; gap: 4px; }
.footer-columns strong { color: var(--text); font-size: 14px; margin-bottom: 6px; }
.footer-columns a:hover { color: var(--text); }
.footer-note { max-width: 1200px; margin: 20px auto 0; text-align: center; font-size: 12.5px; line-height: 1.9; }
@media (max-width: 760px) {
  .site-footer { padding: 20px 16px 18px; background: var(--soft); }
  .footer-columns { display: flex; flex-direction: column; gap: 0; }
  .footer-columns > div { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .footer-columns > div:last-child { border-bottom: 0; }
  .footer-columns strong { display: block; margin: 0 0 6px; }
  .footer-columns a { display: inline-block; padding: 3px 0; margin-inline-end: 16px; color: var(--muted-2); }
}

/* Phones: one header line — the mark (home), the search, the tools; the group row under it */
@media (max-width: 760px) {
  .top-inner { gap: 8px; padding: 8px 10px; }
  .wordmark .wordmark-text { display: none; }
  .phone-mark { display: block; height: 36px; width: 36px; }
  .searchbar { height: 44px; max-width: none; }
  .top .top-tools .tool-link[href*="saved"], .top .top-tools .theme-toggle { display: none; }
  .cat-strip-inner { padding: 0 6px; }
  .cat-strip a { padding: 7px 9px 9px; font-size: 12.5px; }
}
