/* Kapara Deal V2 storefront. Clean white ecommerce surface, Kapara red accent. */
:root {
  --red: #d81f2a;
  --red-dark: #b3141e;
  --red-soft: #fdecec;
  --ink: #16181d;
  --muted: #6b7079;
  --line: #eceef1;
  --page: #f6f7f9;
  --surface: #ffffff;
  --star: #f5a524;
  --radius-card: 16px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-card-hover: 0 14px 30px rgba(16, 24, 40, .14), 0 4px 10px rgba(16, 24, 40, .06);
  --content: 1400px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Noto Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); line-height: 1.45; }
img, svg { display: block; }
button { font: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.skip-link { position: absolute; inset-inline-start: 12px; top: -48px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 8px; }

/* ---- Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
/* The approved concept keeps the logo top-left in both languages. */
.header-inner { direction: ltr; max-width: var(--content); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; border-radius: 12px; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; }
.brand-name b { color: var(--red); font-weight: 800; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--page); }
.lang-button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; }
.lang-button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }

/* ---- Category bar ----------------------------------------------------------- */
.category-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.category-scroller {
  max-width: var(--content); margin: 0 auto; padding: 12px 16px 10px;
  display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.category-scroller::-webkit-scrollbar { display: none; }
[dir="rtl"] .hero-title, [dir="rtl"] .products-head h2, [dir="rtl"] .price-now { letter-spacing: 0; }
.category-link {
  flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 84px; max-width: 116px; padding: 6px 6px; border-radius: 14px; color: var(--ink); text-decoration: none; text-align: center;
  font-size: 13px; font-weight: 600; line-height: 1.25;
}
.category-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #f3f4f6; color: var(--red); transition: background-color .15s ease, color .15s ease; }
.category-icon svg { width: 26px; height: 26px; }
.category-label { max-width: 100%; overflow-wrap: break-word; hyphens: manual; }
.category-link[aria-current="page"] .category-icon { background: var(--red); color: #fff; }
.category-link[aria-current="page"] .category-label { color: var(--red); font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .category-link:hover .category-icon { background: var(--red-soft); }
  .category-link[aria-current="page"]:hover .category-icon { background: var(--red-dark); }
}
@media (min-width: 1150px) {
  .category-scroller { justify-content: space-between; -webkit-mask-image: none; mask-image: none; }
  .category-link { min-width: 100px; }
}

/* ---- Hero ------------------------------------------------------------------- */
.hero { max-width: var(--content); margin: 16px auto 0; padding: 0 16px; }
.hero-inner {
  position: relative; overflow: hidden; display: flex; align-items: center; min-height: 168px;
  padding: 26px 32px; border-radius: 20px; color: #fff;
  background: linear-gradient(115deg, #c8141f 0%, var(--red) 38%, #ef4a2c 72%, #ff7b32 100%);
}
.hero-inner::before, .hero-inner::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.hero-inner::before { width: 340px; height: 340px; inset-inline-end: -80px; top: -150px; }
.hero-inner::after { width: 220px; height: 220px; inset-inline-end: 180px; bottom: -150px; }
.hero-content { position: relative; z-index: 1; max-width: 760px; padding-inline-end: 150px; }
.hero-eyebrow { display: inline-block; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 13px; font-weight: 700; }
.hero-title { margin: 10px 0 6px; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -.3px; }
.hero-text { margin: 0; max-width: 520px; font-size: 15px; opacity: .94; }
.hero-cta { display: inline-block; margin-top: 14px; padding: 9px 18px; border-radius: 999px; background: #fff; color: var(--red); font-weight: 700; text-decoration: none; }
.hero-cta:focus-visible { outline-color: #fff; }
.hero-art { position: absolute; z-index: 1; inset-inline-end: 44px; top: 50%; width: 150px; height: 150px; transform: translateY(-50%); }

/* ---- Products --------------------------------------------------------------- */
.products { max-width: var(--content); margin: 0 auto; padding: 22px 16px 44px; }
.products:focus { outline: none; }
.products-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.products-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.2px; }
.products-status { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.products-status:empty { margin: 0; }
.retry { margin: 0 0 16px; padding: 9px 18px; border: 1.5px solid var(--red); border-radius: 999px; background: var(--surface); color: var(--red); font-weight: 700; cursor: pointer; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-grid[aria-busy="true"] { min-height: 60vh; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1150px) { .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1400px) { .product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---- Product card ----------------------------------------------------------- */
.product-card { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.product-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; border-radius: var(--radius-card); }
.product-link:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.product-media { position: relative; aspect-ratio: 1 / 1; padding: 8px; background: var(--surface); border-radius: var(--radius-card) var(--radius-card) 0 0; overflow: hidden; }
.product-image { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.product-badge { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 8px; border-radius: 8px; background: var(--red); color: #fff; font-size: 13px; font-weight: 800; direction: ltr; }
.product-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 8px 12px 12px; }
.product-title { margin: 0; min-height: 2.7em; font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; min-height: 1.3em; margin: 0; color: var(--muted); font-size: 12.5px; }
.product-rating { display: inline-flex; gap: 3px; direction: ltr; }
.product-rating .star { color: var(--star); }
.product-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: auto 0 0; }
.price-now { color: var(--red); font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.price-old { color: #9aa0a8; font-size: 13px; }
.product-cta { display: block; margin-top: 4px; padding: 10px 8px; border-radius: 10px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; text-align: center; transition: background-color .18s ease; }

/* Desktop pointer hover only: lift + slight scale, no layout change. */
@media (hover: hover) and (pointer: fine) {
  .product-card { transition: transform 180ms ease, box-shadow 180ms ease; }
  .product-card:hover { z-index: 2; transform: translateY(-3px) scale(1.025); box-shadow: var(--shadow-card-hover); }
  .product-card:hover .product-cta { background: var(--red-dark); }
}
.product-card:focus-within { box-shadow: var(--shadow-card-hover); }

/* Skeleton: same geometry as a real card. */
.product-card.is-skeleton { box-shadow: none; }
.sk-block, .sk-line, .sk-cta { background: linear-gradient(90deg, #f0f1f3 0%, #f7f8f9 50%, #f0f1f3 100%); background-size: 200% 100%; animation: sk-shimmer 1.3s linear infinite; }
.is-skeleton .product-media { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.sk-line { display: block; height: 13px; border-radius: 6px; }
.sk-short { width: 62%; }
.sk-price { width: 44%; height: 20px; margin-top: 10px; }
.sk-cta { display: block; height: 40px; margin-top: 4px; border-radius: 10px; }
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-card, .product-card:hover { transition: none; transform: none; }
  .category-icon, .product-cta { transition: none; }
  .sk-block, .sk-line, .sk-cta { animation: none; }
}

/* ---- Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--page); }
.footer-inner { max-width: var(--content); margin: 0 auto; padding: 22px 16px 30px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer-inner p { margin: 0 0 6px; max-width: 900px; }
.footer-legal { font-weight: 600; }

/* ---- Mobile ----------------------------------------------------------------- */
@media (max-width: 639px) {
  .header-inner { padding: 8px 12px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-name { font-size: 18px; }
  .lang-button { padding: 5px 9px; font-size: 13px; }
  .category-scroller { padding: 10px 12px 8px; gap: 6px; }
  .category-link { min-width: 72px; max-width: 104px; font-size: 12px; gap: 5px; padding: 6px 4px; }
  .category-icon { width: 46px; height: 46px; }
  .category-icon svg { width: 23px; height: 23px; }
  .hero { margin-top: 12px; padding: 0 12px; }
  .hero-inner { min-height: 0; padding: 16px 18px; border-radius: 16px; }
  .hero-content { padding-inline-end: 88px; }
  .hero-title { font-size: 20px; margin: 0 0 4px; }
  .hero-eyebrow { display: none; }
  .hero-text { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-cta { display: none; }
  .hero-art { width: 84px; height: 84px; inset-inline-end: 12px; opacity: .9; }
  .products { padding: 16px 12px 36px; }
  .products-head h2 { font-size: 19px; }
  .product-media { padding: 6px; }
  .product-body { gap: 4px; padding: 6px 9px 10px; }
  .product-title { font-size: 13px; }
  .product-meta { font-size: 11.5px; }
  .price-now { font-size: 17px; }
  .price-old { font-size: 12px; }
  .product-cta { padding: 9px 6px; font-size: 13px; }
  .product-badge { top: 8px; inset-inline-start: 8px; font-size: 12px; }
}
@media (max-width: 359px) {
  .brand-name { display: none; }
}
