/* Crocdeals — first layer
   Cream field, forest ink, lime bite. Bilingual RTL/LTR. */

:root {
  --ink: #10231c;
  --ink-2: #243830;
  --croc: #1a4f38;
  --croc-deep: #0e3a28;
  --croc-soft: #2d6a4f;
  --bite: #d7f056;
  --bite-hover: #e4f87a;
  --deal: #c6451c;
  --cream: #f3efe4;
  --paper: #fffcf6;
  --sand: #e6dfd0;
  --line: #d4cdb8;
  --muted: #5a6b63;
  --muted-2: #7a877f;
  --join: #196447;
  --join-hover: #134e37;
  --shadow: 0 1px 2px rgba(16, 35, 28, 0.05), 0 10px 28px rgba(16, 35, 28, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
  --font-serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --font-sans: "Rubik", "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--croc); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--croc-deep); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; }

.skip {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.logo:hover { color: var(--ink); }
.logo img, .logo svg { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.wordmark {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 2px;
  gap: 0;
}
.lang-switch a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  line-height: 1.2;
}
.lang-switch a[aria-current="page"],
.lang-switch a.is-active {
  background: var(--ink);
  color: var(--paper);
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.is-active:hover { color: var(--paper); }

/* Buttons
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-join {
  background: var(--join);
  color: var(--paper);
}
.btn-join:hover { background: var(--join-hover); color: var(--paper); }
.btn-deal {
  background: var(--bite);
  color: var(--ink);
  width: 100%;
  border-radius: 12px;
  font-weight: 700;
}
.btn-deal:hover { background: var(--bite-hover); color: var(--ink); }
.btn-ink {
  background: var(--ink);
  color: var(--paper);
}
.btn-ink:hover { background: var(--ink-2); color: var(--paper); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); }

.icon-wa {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

/* Hub hero
   ------------------------------------------------------------------ */
main { flex: 1; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
}
.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--croc-soft);
  margin-bottom: 0.85rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin-bottom: 1.15rem;
  max-width: 12ch;
}
.lede, .hero-lead {
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 38rem;
  line-height: 1.7;
}
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-art img {
  width: min(100%, 320px);
  height: auto;
  border-radius: 28%;
  box-shadow: var(--shadow);
}

/* Niche index
   ------------------------------------------------------------------ */
.section { padding: 0 0 4.5rem; }
.section-head { margin-bottom: 1.5rem; max-width: 40rem; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.5rem;
}
.section-head p { color: var(--ink-2); }

.niche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}
.niche-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
  min-height: 12.5rem;
}
.niche-card:hover {
  border-color: var(--croc-soft);
  color: inherit;
  transform: translateY(-2px);
}
.niche-card .name {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.niche-card .tagline { color: var(--ink-2); flex: 1; }
.niche-urls {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-ligatures: none;
  word-break: break-all;
}
.niche-urls span { color: var(--muted-2); margin-inline-end: 0.35rem; }
.niche-cta {
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--croc);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Niche page hero + join
   ------------------------------------------------------------------ */
.niche-hero {
  padding: clamp(1.8rem, 4.5vw, 3.4rem) 0 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  gap: 2rem;
  align-items: end;
}
.niche-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 0.35rem;
}
.niche-hero .tag {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--croc);
  font-weight: 600;
  margin-bottom: 0.9rem;
}
.niche-hero .hero-lead { font-size: 1.02rem; }
.join-panel {
  background: var(--croc-deep);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.3rem;
  box-shadow: var(--shadow);
}
.join-panel .join-lead {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.45rem;
  color: var(--paper);
}
.join-panel .join-note {
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--cream) 80%, white);
  margin-bottom: 1rem;
  line-height: 1.55;
}
.join-panel .btn-join {
  background: var(--bite);
  color: var(--ink);
  width: 100%;
}
.join-panel .btn-join:hover { background: var(--bite-hover); color: var(--ink); }

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb-sep { opacity: 0.5; }

/* Catalog
   ------------------------------------------------------------------ */
.catalog { padding: 0.5rem 0 4.5rem; }
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
}
.toolbar-top h2 { font-size: 1.65rem; }
.results-count { color: var(--muted); font-size: 0.92rem; }
.search {
  position: relative;
  flex: 1 1 16rem;
  max-width: 28rem;
}
.search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.search input {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1.1rem 0.7rem 2.6rem;
  outline: none;
}
[dir="rtl"] .search input { padding: 0.7rem 2.6rem 0.7rem 1.1rem; }
.search input:focus { border-color: var(--croc-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--croc) 18%, transparent); }
.search .search-icon {
  position: absolute;
  inset-inline-start: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted);
  pointer-events: none;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.3;
}
.chip:hover { border-color: var(--croc-soft); background: var(--paper); }
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 100%;
}
.product-card .media {
  aspect-ratio: 1;
  background: #f1eee6;
  overflow: hidden;
}
.product-card .media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.product-card .body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1rem 1.05rem;
  flex: 1;
}
.cat-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--croc);
}
.product-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.short-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.meta .star { color: #b8860b; }
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.price {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.old-price {
  font-size: 0.92rem;
  color: var(--muted-2);
  text-decoration: line-through;
}
.aff-note {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 0.45rem;
}
.price-fine {
  font-size: 0.72rem;
  color: var(--muted-2);
  margin-top: 0.15rem;
}
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty[hidden], [hidden] { display: none !important; }
.empty p { margin-bottom: 0.9rem; }

/* Legal
   ------------------------------------------------------------------ */
.legal {
  padding: 2.5rem 0 5rem;
  max-width: 42rem;
}
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0.3rem 0 0.5rem; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.legal h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.7rem;
}
.legal p { margin-bottom: 0.85rem; color: var(--ink-2); }

/* Footer
   ------------------------------------------------------------------ */
.site-footer {
  background: var(--croc-deep);
  color: color-mix(in srgb, var(--cream) 88%, white);
  padding: 2.4rem 0 2rem;
  margin-top: auto;
}
.site-footer a { color: var(--bite); }
.site-footer a:hover { color: var(--bite-hover); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 1.5rem 2.5rem;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-brand .logo { color: var(--paper); }
.footer-brand .logo:hover { color: var(--paper); }
.footer-brand .tagline { font-size: 0.95rem; max-width: 18rem; }
.footer-disclosure { font-size: 0.88rem; line-height: 1.6; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid color-mix(in srgb, var(--cream) 16%, transparent);
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--cream) 70%, white);
}

/* 404
   ------------------------------------------------------------------ */
.not-found {
  text-align: center;
  padding: 4.5rem 0 6rem;
}
.not-found img { width: 120px; margin: 0 auto 1.4rem; border-radius: 28%; }
.not-found h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }
.not-found p { color: var(--ink-2); margin-bottom: 1.4rem; }

/* Focus
   ------------------------------------------------------------------ */
:focus-visible {
  outline: 3px solid var(--croc-soft);
  outline-offset: 2px;
}
.btn:focus-visible,
.chip:focus-visible,
.lang-switch a:focus-visible {
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .hero,
  .niche-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 1.8rem; }
  .hero h1 { max-width: none; }
  .hero-art { order: -1; }
  .hero-art img { width: min(100%, 200px); }
  .niche-hero { align-items: stretch; }
  .join-panel { position: static; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 1.4rem, var(--max)); }
  .site-header { height: 60px; }
  :root { --header-h: 60px; }
  .wordmark { font-size: 0.98rem; }
  .logo img { width: 32px; height: 32px; }
  .btn-join-header .btn-label-full { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .product-card .body { padding: 0.75rem 0.7rem 0.85rem; gap: 0.35rem; }
  .product-card h3 { font-size: 0.9rem; }
  .short-desc { display: none; }
  .price { font-size: 1.05rem; }
  .aff-note { font-size: 0.68rem; }
  .search { max-width: none; }
  .niche-hero .hero-lead { font-size: 0.95rem; }
  .eyebrow { letter-spacing: 0.02em; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}
