/* Shetach Deals · car site · created by Eldan Ben Ami */

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 58px; padding: 0 var(--gutter);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand .blaze { --c: var(--accent); box-shadow: inset 0 0 0 1px rgba(31, 36, 24, .25); }
.share-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.share-pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.fav-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 600; cursor: pointer;
}
.fav-pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav-pill[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.fav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--heart); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
@media (max-width: 420px) { .share-pill span { display: none; } .share-pill { padding: 0 11px; } }
.home-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 8px; border-radius: 999px;
  background: #1C3126; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.home-pill img { width: 24px; height: 24px; border-radius: 6px; }
@media (max-width: 480px) { .fav-pill > span:first-of-type { display: none; } .fav-pill { padding: 0 10px; } }
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin: 26px 0 6px; }
.guide-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: #1C3126; color: #F3EDE0; text-decoration: none; min-width: 0;
}
.guide-card--coupon { background: #7A2318; }
.guide-card svg { width: 30px; height: 30px; flex: none; fill: none; stroke: #F3D9A0; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.guide-card span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.guide-card b { color: #fff; font-size: 17px; line-height: 1.3; }
.guide-card small { font-size: 14px; line-height: 1.45; color: #D9D2BF; }
.guide-card:hover b { text-decoration: underline; text-underline-offset: 3px; }
:root { --heart: #D7372E; }

/* ---------- hero: the one loud moment ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--accent); color: var(--accent-ink);
  padding: 34px var(--gutter) 30px;
}
.contours { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--accent-ink); opacity: .13; pointer-events: none; z-index: -1; }
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
@media (max-width: 700px) { .hero__photo { object-position: 18% 50%; } }
.hero--photo { color: #fff; min-height: 440px; display: flex; align-items: flex-end; }
.hero--photo::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(14, 17, 10, .86) 0%, rgba(14, 17, 10, .45) 48%, rgba(14, 17, 10, .05) 100%);
}
.hero--photo .contours { display: none; }
.hero__inner { position: relative; width: 100%; max-width: 1120px; margin: 0 auto; }
.hero__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(40px, 11.5vw, 76px);
  line-height: 1;
  letter-spacing: -.035em;
  max-width: 14ch;
  text-wrap: balance;
}
.hero__lede { margin: 14px 0 0; max-width: 40ch; font-size: 17px; line-height: 1.55; font-weight: 450; }
.hero--photo .hero__lede { color: rgba(255, 255, 255, .9); }
/* without a photo the top is a short page title, not a coloured banner */
.hero:not(.hero--photo) { background: transparent; color: var(--ink); padding: 22px var(--gutter) 4px; }
.hero:not(.hero--photo) .contours { display: none; }
.hero:not(.hero--photo) .hero__title { font-size: clamp(26px, 6.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; max-width: none; }
.hero:not(.hero--photo) .hero__lede { margin-top: 6px; font-size: 16px; color: var(--ink-2); max-width: 62ch; }
.hero:not(.hero--photo) .gen { margin-top: 14px; }

.gen { margin-top: 24px; }
.gen__q { margin: 0 0 8px; font-weight: 700; font-size: 14.5px; }
.seg {
  display: flex; gap: 4px; padding: 4px; max-width: 480px;
  border-radius: 14px; background: rgba(31, 36, 24, .12);
}
.hero--photo .seg { background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.seg__btn {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font-weight: 600; font-size: 14px; line-height: 1.25; cursor: pointer;
  transition: background .15s, color .15s;
}
.seg__btn[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.hero--photo .seg__btn[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ---------- finder ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.finder {
  position: sticky; top: 58px; z-index: 20;
  margin: 0 calc(var(--gutter) * -1); padding: 12px var(--gutter) 6px;
  background: var(--chalk);
}
.search {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  background: var(--paper); border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -12px rgba(31, 36, 24, .35);
}
.search:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }

.cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.cat .n { color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cat[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.cat[aria-pressed="true"] .n { color: rgba(255, 255, 255, .7); }
.cat[disabled] { opacity: .4; cursor: default; }

.sec-title { margin: 26px 0 14px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.count { margin: -10px 0 14px; color: var(--ink-2); font-size: 14px; }

/* ---------- product card (grid + rail) ---------- */
.grid, .rail { list-style: none; margin: 0; padding: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
  margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; }
.grid > li, .rail > li { display: flex; }
.grid > li > .card, .rail > li > .card { flex: 1; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border-radius: 16px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
  scroll-margin-top: 170px;
}
.card.is-target { box-shadow: 0 0 0 3px var(--accent), 0 0 0 5px var(--ink); }
.card__media { position: relative; aspect-ratio: 1; background: #F7F7F5; }
.card__img { display: block; width: 100%; height: 100%; }
.card__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: #A3A897; }
.noimg svg { width: 34%; height: 34%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  padding: 4px 9px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; line-height: 1.2;
}
.card__fav {
  position: absolute; top: 8px; inset-inline-end: 8px;
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18); cursor: pointer;
}
.card__fav svg, .icon-round svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__fav[aria-pressed="true"], .icon-round[aria-pressed="true"] { color: var(--heart); }
.card__fav[aria-pressed="true"] svg, .icon-round[aria-pressed="true"] svg { fill: currentColor; }
.card__fav.pop svg, .icon-round.pop svg { animation: pop .3s ease-out; }
@keyframes pop { 50% { transform: scale(1.3); } }
.badge--hot { background: var(--ink); color: #fff; }
.badge--new { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.stats { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--ink-2); }
.stats b { color: var(--ink); font-weight: 700; }
.price s { margin-inline-start: 10px; font-size: 13px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.price .off { margin-inline-start: 6px; font-size: 13px; font-weight: 700; color: #B3261E; letter-spacing: 0; }

.card__body { display: flex; flex-direction: column; gap: 5px; padding: 12px 12px 12px; flex: 1; }
.card__cat { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.card__title {
  margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__note {
  margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__fit { margin: 0; align-self: flex-start; padding: 2px 8px; border-radius: 6px; background: var(--chalk); font-size: 12px; font-weight: 600; }
.card__foot { margin-top: auto; padding-top: 8px; display: grid; gap: 8px; }
.price { font-weight: 800; font-size: 19px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.price small { display: block; margin-top: 2px; font-weight: 400; font-size: 11.5px; color: var(--ink-2); letter-spacing: 0; }
.buy {
  display: flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 12px; border-radius: 12px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 14.5px;
  transition: transform .08s;
}
.buy:active { transform: scale(.97); }
.buy:hover { background: #343a2c; }

.empty { padding: 28px 20px; background: var(--paper); border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.empty h3 { margin: 0 0 6px; font-size: 18px; }
.empty p { margin: 0 0 14px; color: var(--ink-2); }
.empty button { height: 42px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; }

/* ---------- car sites on the general site ---------- */
.sites { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.site-link {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px;
  border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px;
}
.site-link:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.site-link .blaze { width: 18px; height: 22px; }
.site-link small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.foot__meta a { color: var(--accent); font-weight: 600; }

/* ---------- list header + sort ---------- */
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.list-head .count { margin: -8px 0 14px; }
.sort { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.sort select { height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; }

/* ---------- join the community ---------- */
.join { background: var(--accent); color: var(--accent-ink); padding: 30px var(--gutter); }
.join__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.join h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.join p { margin: 0; max-width: 52ch; font-size: 15.5px; }
.join__btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #E3E5DC; padding: 32px var(--gutter) 44px; margin-top: 8px; }
.foot > * { max-width: 1120px; margin-inline: auto; }
.foot__disclose { margin: 0 auto 10px; font-size: 14px; line-height: 1.6; max-width: 62ch; color: #C9CDBF; }
.foot__community { display: inline-block; margin: 4px 0 6px; color: var(--accent); font-weight: 600; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px auto 12px; }
.foot__links a { color: #fff; font-size: 14.5px; min-height: 32px; display: inline-flex; align-items: center; }
.foot__meta { margin: 0 auto; font-size: 13px; color: #A9AE9E; }

.toast {
  position: fixed; inset-inline: 16px; bottom: 18px; z-index: 40;
  max-width: 420px; margin: 0 auto; padding: 12px 16px;
  background: var(--ink); color: #fff; border-radius: 12px; font-weight: 500;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- card opens the details window ---------- */
.card__link { color: inherit; text-decoration: none; }
.card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { box-shadow: 0 0 0 3px var(--ink); }
.buy { position: relative; z-index: 2; }
.card__fav, .badge { z-index: 2; }
.card { cursor: pointer; transition: box-shadow .15s; }
@media (hover: hover) { .card:hover { box-shadow: 0 0 0 1.5px var(--ink-2); } }

/* ---------- product details window ---------- */
html.pd-open { overflow: hidden; }
.pd {
  width: 100%; max-width: 100%; max-height: 92dvh;
  margin: auto 0 0; padding: 0; border: 0;
  border-radius: 20px 20px 0 0; background: var(--paper); color: var(--ink);
  overflow: auto; overscroll-behavior: contain;
}
.pd::backdrop { background: rgba(14, 17, 10, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.pd[open] { animation: pd-up .22s ease-out; }
@keyframes pd-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.pd__inner { position: relative; }
.pd__close {
  position: sticky; top: 10px; z-index: 3; float: left; margin: 10px 10px -56px 0;
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: var(--ink); cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.pd__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pd__media { aspect-ratio: 1; max-height: 52dvh; width: 100%; background: #F7F7F5; display: grid; place-items: center; }
.pd__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.pd__media .noimg { min-height: 220px; }
.pd__body { display: grid; gap: 10px; padding: 18px var(--gutter) 18px; }
.pd__title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; }
.pd__note { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.pd__note:empty { display: none; }
.pd__buy {
  position: sticky; bottom: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px;
  margin: 6px calc(var(--gutter) * -1) 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.pd__buy .price { font-size: 24px; }
.pd__cta { grid-column: 1 / -1; min-height: 52px; font-size: 17px; border-radius: 14px; }

.pd__check { margin: 4px 0 0; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #FFF6D6; font-size: 13.5px; line-height: 1.5; }
.pd__check svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pd__icons { grid-row: 1; grid-column: 2; display: flex; gap: 8px; }
.icon-round { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--chalk); color: var(--ink); cursor: pointer; }
.pd__similar { padding: 6px var(--gutter) 22px; border-top: 1px solid var(--line); }
.pd__similar h3 { margin: 14px 0 10px; font-size: 17px; font-weight: 800; }
.mini { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; display: grid; grid-auto-flow: column; grid-auto-columns: 40%; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.mini::-webkit-scrollbar { display: none; }
.mini__item { display: grid; gap: 6px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: var(--chalk); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.mini__item .mimg { aspect-ratio: 1; border-radius: 8px; background: #fff; overflow: hidden; }
.mini__item img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.mini__item .t { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini__item .pr { font-size: 14px; font-weight: 800; }

@media (min-width: 760px) {
  .pd { width: min(900px, 92vw); max-height: 86vh; margin: auto; border-radius: 20px; }
  .pd[open] { animation-name: pd-in; }
  @keyframes pd-in { from { transform: scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
  .pd__inner { display: grid; grid-template-columns: 1fr 1fr; }
  .pd__close { position: absolute; top: 12px; left: 12px; float: none; margin: 0; }
  .pd__media { aspect-ratio: 1; max-height: none; border-radius: 0 20px 0 0; }
  .pd__body { padding: 32px 28px 0; align-content: start; }
  .pd__title { font-size: 26px; }
  .pd__buy { position: static; margin: 8px 0 0; padding: 16px 0; border-top: 1px solid var(--line); background: none; }
  .pd__similar { grid-column: 1 / -1; padding: 6px 28px 26px; }
  .mini { margin: 0; padding: 0; grid-auto-columns: calc((100% - 50px) / 6); }
}

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .rail { grid-auto-columns: 34%; }
}
@media (min-width: 960px) {
  :root { --gutter: 32px; }
  .hero { padding-top: 64px; padding-bottom: 56px; }
  .hero:not(.hero--photo) { padding-top: 30px; padding-bottom: 6px; }
  .hero--photo { min-height: 520px; }
  .hero__lede { font-size: 19px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .rail { grid-auto-columns: calc((100% - 54px) / 4); margin: 0; padding-inline: 0; }
  .card__title { font-size: 16px; }
}

/* store coupon from the AliExpress product page */
.card__coupon { margin: 0; font-size: 13px; font-weight: 600; color: #B4261C; display: flex; align-items: center; gap: 6px; }
.card__coupon::before { content: ''; width: 14px; height: 10px; border: 2px solid currentColor; border-radius: 2px; border-left-style: dashed; flex: none; }
.pd__coupon { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: #7A2318; }
.pd__code { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 2px dashed #B4261C; border-radius: 10px; background: #FFF1EE; color: #7A2318; font: 800 17px/1 var(--font-body); letter-spacing: .06em; direction: ltr; cursor: pointer; }
.pd__code svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pd__code:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
