/* ==========================================================================
   Phase 10 — homepage
   --------------------------------------------------------------------------
   Enqueued only on is_front_page(). Tokens only, no hardcoded colors or sizes
   (Hard Rules 4 and 5); the export's translucent Tailwind shades become
   color-mix() over a token rather than a second literal oklch().

   `.bento-card` carries no padding of its own, so every card here sets it.
   ========================================================================== */

/* A section that follows another with no gap between them — the export drops
   the top padding on the last three (index.tsx:384, :414). */
.section--flush-top { padding-top: 0; }

.home-heading {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
}

@media (min-width: 640px) { .home-heading { font-size: 2.25rem; } }

/* --------------------------------------------------------------------------
   1 — Hero
   -------------------------------------------------------------------------- */

.home-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }

.home-hero__grid { position: absolute; inset: 0; opacity: 0.5; pointer-events: none; }

.home-hero__inner { position: relative; padding-block: 3.5rem; }
@media (min-width: 640px) { .home-hero__inner { padding-block: 5rem; } }

.home-hero__bento { display: grid; gap: 1rem; }

@media (min-width: 768px) {
  .home-hero__bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .home-hero__main { grid-column: span 4; }
  .home-hero__aside { grid-column: span 2; }
}

.home-hero__main { display: flex; flex-direction: column; padding: 1.75rem; }
@media (min-width: 640px) { .home-hero__main { padding: 2.5rem; } }

.home-hero__chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-soft);
  color: var(--accent-foreground);
  padding: 0.375rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.home-hero__title {
  margin-top: 1.5rem;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.05;
}

@media (min-width: 640px) { .home-hero__title { font-size: 3.75rem; } }

.home-hero__subtitle {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.375;
  color: var(--muted-foreground);
}

@media (min-width: 640px) { .home-hero__subtitle { font-size: 1.5rem; } }

.home-hero__lead,
.home-hero__note {
  max-width: 42rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.home-hero__lead { margin-top: 1.25rem; font-size: 1rem; }
.home-hero__note { margin-top: 1rem; font-size: 0.875rem; }

.home-hero__ctas {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

@media (min-width: 640px) { .home-hero__ctas { flex-direction: row; } }

.home-cta {
  display: inline-flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: var(--radius-3xl);
  background-color: var(--primary);
  color: var(--primary-foreground);
  /* 1.3rem, not the 1.5rem the export implies: at 1.5rem "Naruči sada -
     Plaćanje pouzećem" wraps to a second line inside the button. */
  padding: 1rem 1.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.home-cta:hover { opacity: 0.9; }
.home-cta__label { display: flex; align-items: center; gap: 0.5rem; }
.home-cta__sub { font-size: 0.75rem; font-weight: 400; line-height: 1.5; opacity: 0.9; }

/* --------------------------------------------------------------------------
   Hero carousel (hero-banner-carousel.tsx)
   -------------------------------------------------------------------------- */

.hero-carousel { position: relative; height: 100%; min-height: 18rem; overflow: hidden; border-radius: inherit; }
.hero-carousel__viewport { height: 100%; overflow: hidden; }
.hero-carousel__track { display: flex; height: 100%; transition: transform 0.5s ease; }

@media (prefers-reduced-motion: reduce) { .hero-carousel__track { transition: none; } }

.hero-carousel__slide { position: relative; flex: 0 0 100%; min-width: 0; height: 100%; }

/* Before carousel.js marks the root live, the slides after the first are off
   the viewport but still in the tab order. Hiding them keeps the no-JS state
   honest; it changes nothing visually, since they are off-screen either way. */
.hero-carousel:not(.is-live) .hero-carousel__slide:not(:first-child) { visibility: hidden; }

.hero-carousel__image { height: 100%; min-height: 18rem; width: 100%; object-fit: cover; }

.hero-carousel__scrim {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to top,
    color-mix(in oklab, var(--ink) 85%, transparent) 0%,
    color-mix(in oklab, var(--ink) 35%, transparent) 50%,
    transparent 100%
  );
}

.hero-carousel__body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.5rem;
  color: var(--ink-foreground);
}

.hero-carousel__kicker {
  display: inline-flex;
  border-radius: var(--radius-full);
  background-color: color-mix(in oklab, var(--ink-foreground) 15%, transparent);
  padding: 0.25rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero-carousel__title { margin-top: 0.75rem; font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
.hero-carousel__text { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.625; opacity: 0.9; }

.hero-carousel__cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--ink-foreground);
  color: var(--ink);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.hero-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  border-radius: var(--radius-full);
  background-color: color-mix(in oklab, var(--card) 80%, transparent);
  color: var(--foreground);
  padding: 0.5rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(4px);
  transition: background-color 0.15s ease;
}

.hero-carousel__arrow:hover { background-color: var(--card); }
.hero-carousel__arrow--prev { left: 0.75rem; }
.hero-carousel__arrow--next { right: 0.75rem; }

.hero-carousel__dots {
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-carousel__dot {
  height: 0.5rem;
  width: 0.5rem;
  border-radius: var(--radius-full);
  background-color: color-mix(in oklab, var(--card) 70%, transparent);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.hero-carousel__dot.is-active { width: 1.5rem; background-color: var(--primary); }

/* --------------------------------------------------------------------------
   2 — Istaknuti proizvodi
   -------------------------------------------------------------------------- */

.home-featured__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.home-featured__all { flex-shrink: 0; font-size: 0.875rem; font-weight: 600; color: var(--primary); }
.home-featured__all:hover { text-decoration: underline; }

/* The shared .product-grid goes to four columns at 1280px; the homepage row is
   six cards in two rows of three, and on mobile it snap-scrolls instead of
   stacking (index.tsx:314). Declared after woocommerce.css, which is what
   settles the tie between two single-class selectors. */
.product-grid--featured {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}

.product-grid--featured > * { flex: 0 0 85%; scroll-snap-align: start; }

@media (min-width: 640px) {
  .product-grid--featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }
  .product-grid--featured > * { flex: initial; }
}

@media (min-width: 1024px) { .product-grid--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .product-grid--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --------------------------------------------------------------------------
   3 — Zašto izabrati
   -------------------------------------------------------------------------- */

.home-why {
  border-block: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--secondary) 40%, transparent);
}

.home-why__lead { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }

.home-why__grid { margin-top: 2rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .home-why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .home-why__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.home-benefit { padding: 1.5rem; }
.home-benefit__icon { color: var(--primary); }
.home-benefit__title { margin-top: 1rem; font-size: 1.125rem; font-weight: 600; }
.home-benefit__text { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }

.home-why__ctas { margin-top: 1rem; display: grid; gap: 1rem; }
@media (min-width: 1024px) { .home-why__ctas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.home-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
}

.home-panel__body { min-width: 0; }
.home-panel__title { font-size: 1.125rem; font-weight: 600; }
.home-panel__text { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
.home-panel .btn { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   4 — Urgency strip
   -------------------------------------------------------------------------- */

.home-urgency {
  background-color: var(--ink);
  color: var(--ink-foreground);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.home-urgency__inner { display: inline-flex; align-items: center; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   5 — Lab tests slider
   -------------------------------------------------------------------------- */

.lab-tests__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }
.lab-tests__heading { font-size: 1.875rem; font-weight: 600; }
@media (min-width: 640px) { .lab-tests__heading { font-size: 2.25rem; } }

.lab-tests__by {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.lab-tests__brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--foreground); }
.lab-tests__brand:hover { color: var(--primary); }
.lab-tests__logo { height: 1.75rem; width: 1.75rem; border-radius: var(--radius-full); object-fit: contain; }

.lab-tests__nav { display: flex; gap: 0.5rem; }

.lab-tests__arrow {
  display: flex;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 0.625rem;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.lab-tests__arrow:hover:not(:disabled) { color: var(--foreground); }
.lab-tests__arrow:disabled { opacity: 0.4; cursor: default; }

/* Scrolls by touch, wheel and keyboard, but shows no scrollbar — the arrows are
   the affordance (Domagoj, 2026-08-29).

   No padding hack here any more: the cards below carry no shadow, so there is
   nothing for the scroll container to clip. That is the honest fix — a scroll
   container clips on both axes by definition, so a shadow inside one is always
   going to be cut off somewhere; padding only moves the cut further out. */
.lab-tests__track {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lab-tests__track::-webkit-scrollbar { display: none; }

/* The visible cards fill the track edge to edge, gaps included — a percentage
   basis left a ragged strip of background at the right. Below 1024px the
   deliberate part-card peek stays: it is the only hint that the row scrolls at
   a width where the arrows are easy to miss. */
.lab-tests__track > * { flex: 0 0 85%; scroll-snap-align: start; }
@media (min-width: 640px) { .lab-tests__track > * { flex-basis: 48%; } }
@media (min-width: 1024px) { .lab-tests__track > * { flex-basis: calc( ( 100% - 2rem ) / 3 ); } }

/* Flat inside the scroller: border only, no shadow and no hover lift. A card in
   a horizontal scroll container has its shadow clipped at whichever edge it is
   nearest, which reads as a hard grey line rather than as depth (Domagoj,
   2026-08-29). The border alone still separates the card from the section. */
.lab-test {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  box-shadow: none;
}

.lab-test:hover { box-shadow: none; transform: none; }
.lab-test__name { font-size: 1.125rem; font-weight: 600; }
.lab-test__size { font-weight: 500; color: var(--muted-foreground); }
.lab-test__purity { margin-top: 1rem; font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; color: var(--primary); }
.lab-test__purity-label { font-size: 0.875rem; color: var(--muted-foreground); }
.lab-test__eyebrow { margin-top: 1rem; }
.lab-test__brand { margin-top: 0.25rem; padding-bottom: 0.5rem; display: inline-flex; width: fit-content; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; }
.lab-test__brand:hover { color: var(--primary); }
.lab-test__logo { height: 1.5rem; width: 1.5rem; border-radius: var(--radius-full); object-fit: contain; }

.lab-test__foot {
  margin-top: auto;
  padding-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
}

.lab-test__batch {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.lab-test__report { flex-shrink: 0; padding: 0.5rem 1rem; }

/* --------------------------------------------------------------------------
   6 — Plaćanje pouzećem
   -------------------------------------------------------------------------- */

.home-cod__grid { display: grid; gap: 1rem; }

@media (min-width: 1024px) {
  .home-cod__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-cod__main { grid-column: span 2; }
}

.home-cod__main { padding: 2rem; }
.home-cod__title { font-size: 1.5rem; font-weight: 600; }
@media (min-width: 640px) { .home-cod__title { font-size: 1.875rem; } }

.home-cod__list { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.home-cod__item { display: flex; gap: 0.75rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.home-cod__icon { margin-top: 0.125rem; color: var(--primary); }
.home-cod__cta { margin-top: 1.75rem; }

.home-cod__aside { display: grid; align-content: center; gap: 0.75rem; padding: 2rem; }
.home-cod__aside-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.35; }

/* --------------------------------------------------------------------------
   7 — SEO prose card
   -------------------------------------------------------------------------- */

.home-prose { max-width: 56rem; margin-inline: auto; padding: 2rem; }
@media (min-width: 640px) { .home-prose { padding: 2.5rem; } }

.home-prose__title { font-size: 1.5rem; font-weight: 600; }
@media (min-width: 640px) { .home-prose__title { font-size: 1.875rem; } }

.home-prose h3 { margin-top: 2rem; font-size: 1.125rem; font-weight: 600; }
.home-prose p { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.home-prose__title + p { margin-top: 1rem; }
/* :not(.btn) matters. `.home-prose a` outranks `.btn--primary` (0,1,1 against
   0,1,0), so without it the primary button rendered its label and arrow in
   --primary on a --primary background — invisible — and both buttons picked up
   an underline. */
.home-prose a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }

.home-prose__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --------------------------------------------------------------------------
   8-10 — FAQ, final CTA, RUO
   -------------------------------------------------------------------------- */

.home-close {
  border-top: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--secondary) 40%, transparent);
}

/* Narrower than the 80rem .container it shares an element with (max-w-3xl). */
.home-close__inner { max-width: 48rem; }

.home-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  list-style: none;
}

.home-faq__trigger::-webkit-details-marker { display: none; }
.home-faq__trigger-body { min-width: 0; }

.home-faq__heading { display: block; font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; letter-spacing: -0.025em; }
@media (min-width: 640px) { .home-faq__heading { font-size: 2.25rem; } }

.home-faq__lead { display: block; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 400; color: var(--muted-foreground); }

.home-faq__chevron { flex-shrink: 0; color: var(--muted-foreground); transition: transform 0.2s ease; }
.home-faq[open] .home-faq__chevron { transform: rotate(180deg); }

/* 0: the first group head's own top margin sets the gap, so every group is
   spaced the same whether it is the first or the fourth. */
.home-faq__panel { margin-top: 0; }

.home-final { margin-top: 2rem; padding: 2rem; text-align: center; }
.home-final__title { font-size: 1.5rem; font-weight: 600; }
@media (min-width: 640px) { .home-final__title { font-size: 1.875rem; } }
.home-final__text { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.home-final .btn { margin-top: 1.5rem; }

.home-ruo { margin-top: 2rem; }

/* .home-close is tinted, and the footer's own 2/4rem top margin left a band of
   page background between the two — a stripe of a third colour right where the
   page ends. The closing section's bottom padding already provides the space. */
.site-footer { margin-top: 0; }
