/*
 * "Stage Zero" design tokens — precise background colors/gradients
 * pixel-sampled directly from the site mockup (Test 1 Site kokkoris.pdf,
 * page 1) at 100 DPI, so every future template ("Part") reuses the exact
 * same values instead of re-guessing an approximate teal each time.
 *
 * How each value was obtained (see chat history for the full sampling
 * session): the rendered mockup page was sampled at multiple pixel
 * coordinates per section with ImageMagick to confirm whether a section is
 * a flat fill or a gradient, and to map out gradient stops/position.
 *
 * - Header/nav bar: solid fill, sampled uniformly across the whole bar
 *   width -> single flat color, no gradient.
 * - Hero section: radial gradient. Left/right edges and the top strip (and
 *   by symmetry the corners) all sample to the same darker teal as the
 *   header bar; the lightest point sampled (top-center, just above the
 *   photo) is noticeably lighter. Modeled as a 3-stop radial ellipse
 *   centered slightly above the vertical middle.
 * - "About us" section: pure white.
 * - Footer: pure black.
 */

:root {
  --kokkoris-teal-dark: #42746c;   /* header bar + hero gradient outer/edge/corner stop */
  --kokkoris-teal-mid: #4aa190;    /* hero gradient middle stop (sampled at hero's left/right edges) */
  --kokkoris-teal-light: #6bafa1;  /* hero gradient inner/lightest stop (sampled top-center of hero) */
}

/* Part: header / nav bar. Flat fill, confirmed via multi-point sampling
   across the full bar width (no gradient). */
.bg-kokkoris-header {
  background-color: var(--kokkoris-teal-dark);
}

/* Part: hero section (directly below the header, behind the dog/cats
   photo). Radial gradient - lighter core near top-center fading out to the
   same dark teal as the header at the edges/corners. */
.bg-kokkoris-hero {
  background-color: var(--kokkoris-teal-dark); /* fallback for browsers without gradient support */
  background-image: radial-gradient(
    ellipse 75% 65% at 50% 20%,
    var(--kokkoris-teal-light) 0%,
    var(--kokkoris-teal-mid) 50%,
    var(--kokkoris-teal-dark) 100%
  );
}

/* Part: footer. Flat pure black fill. */
.bg-kokkoris-footer {
  background-color: #000000;
}

/* Part 2 (main panel) — decorative hill backgrounds from back1/back2 PDFs.
   Applied only on <main>, between header and footer — not on homepage. */
.site-main-bg-back1,
.site-main-bg-back2 {
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-size: 100% auto;
  /* Full-width art, bottom-anchored; slight downward offset so hill sits above footer */
  background-position: center calc(100% + 400px);
  min-height: calc(100dvh - 10.5rem);
}

.site-main-bg-back1 {
  background-image: url("../images/backgrounds/back1.png");
}

.site-main-bg-back2 {
  background-image: url("../images/backgrounds/back2.png");
}

/* TROFES PDF landings — full-bleed wave + circular category hotspots. */
.animal-landing {
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  min-height: calc(100dvh - 10.5rem);
}

.animal-landing--cat {
  background: #ff921e;
}

.animal-landing--dog {
  background: #4aa08f;
}

.animal-landing__frame {
  position: relative;
  width: 100%;
  line-height: 0;
}

.animal-landing__band {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  pointer-events: none;
}

.animal-landing__labels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 25.5%;
  z-index: 1;
  pointer-events: none;
}

.animal-landing--cat .animal-landing__labels {
  height: 33%;
}

.animal-landing--cat .animal-landing__label {
  top: 10%;
}

.animal-landing__label {
  position: absolute;
  top: 8%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.84);
  font-family: Inter, sans-serif;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1.28vw, 1.05rem);
  line-height: 1.2;
  white-space: nowrap;
}

.animal-landing__hotspot {
  position: absolute;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  z-index: 2;
}

.animal-landing__hotspot:hover,
.animal-landing__hotspot:focus-visible {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55);
  outline: none;
}

/* Phone: circular category tiles (desktop keeps the full-bleed band). */
.animal-landing__mobile {
  display: none;
}

@media (max-width: 639px) {
  .animal-landing {
    min-height: 0;
    padding: 1.25rem 1rem 1.75rem;
  }

  .animal-landing__desktop {
    display: none;
  }

  .animal-landing__mobile {
    display: block;
  }

  .animal-landing__mobile-grid {
    display: grid;
    gap: 0.85rem 0.65rem;
    max-width: 22rem;
    margin: 0 auto;
  }

  .animal-landing__mobile-grid--dog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .animal-landing__mobile-grid--cat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 18rem;
  }

  .animal-landing__mobile-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: inherit;
  }

  .animal-landing__mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgb(15 23 42 / 0.12);
  }

  .animal-landing--dog .animal-landing__mobile-icon {
    border: 3px solid rgba(255, 255, 255, 0.55);
  }

  .animal-landing--cat .animal-landing__mobile-icon {
    border: 3px solid rgba(255, 255, 255, 0.55);
  }

  .animal-landing__mobile-img {
    display: block;
    width: 88%;
    height: 88%;
    object-fit: contain;
    object-position: center;
  }

  .animal-landing__mobile-label {
    color: rgba(255, 255, 255, 0.92);
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
  }
}

/* Brands landing — SEL_oles etairies.pdf, header cropped. */
.brand-landing {
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  min-height: calc(100dvh - 10.5rem);
  background: #d0ece8;
}

.brand-landing__frame {
  position: relative;
  width: 100%;
  line-height: 0;
}

.brand-landing__band {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.brand-landing__hotspot {
  position: absolute;
  border-radius: 50%;
  z-index: 2;
}

.brand-landing__hotspot:hover,
.brand-landing__hotspot:focus-visible {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55);
  outline: none;
}

.brand-landing__mobile {
  display: none;
}

@media (max-width: 639px) {
  .brand-landing {
    min-height: 0;
    padding: 1.35rem 1rem 1.85rem;
  }

  .brand-landing__desktop {
    display: none;
  }

  .brand-landing__mobile {
    display: block;
  }

  .brand-landing__mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.85rem;
    max-width: 20rem;
    margin: 0 auto;
  }

  .brand-landing__mobile-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: #1e4d46;
  }

  .brand-landing__mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(66, 116, 108, 0.22);
    box-shadow: 0 2px 10px rgb(15 23 42 / 0.08);
    padding: 0.85rem;
  }

  .brand-landing__mobile-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .brand-landing__mobile-fallback {
    font-family: Poppins, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
  }

  .brand-landing__mobile-label {
    font-family: Inter, sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.2;
  }
}

/* Brand landing tiles (and leftover category-tile markup). */

.animal-category-tile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  line-height: 0;
}

.animal-category-tile__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.animal-category-tile__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  pointer-events: none;
}

.animal-category-grid .animal-category-tile__label {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 300;
  text-shadow:
    0 1px 6px rgba(0, 0, 0, 0.25),
    0 0 12px rgba(0, 0, 0, 0.15);
}

.animal-category-grid .animal-category-tile__img,
.brand-tile-grid .animal-category-tile__img {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-tile-grid .animal-category-tile__img {
  padding: 0.4rem;
  max-height: 8.5rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: auto;
}

@media (min-width: 640px) {
  .brand-tile-grid .animal-category-tile__img {
    padding: 0.5rem;
    max-height: 9.5rem;
  }
}

@media (min-width: 1024px) {
  .brand-tile-grid .animal-category-tile__img {
    max-height: 10.5rem;
  }
}

.brand-tile-grid .animal-category-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.animal-category-grid .animal-category-tile:hover .animal-category-tile__img,
.brand-tile-grid .animal-category-tile:hover .animal-category-tile__img {
  opacity: 0.88;
  transform: scale(1.02);
}

/* Bundle category tile — same multiply + white label overlay as other tiles. */
.animal-category-tile--bundle .animal-category-tile__img {
  mix-blend-mode: multiply;
}

.animal-category-grid .animal-category-tile--bundle .animal-category-tile__label {
  color: rgba(255, 255, 255, 0.72);
}

/* Product card images — full card width, shared aspect box so every icon aligns. */
.product-image-slot {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  flex-shrink: 0;
  padding: 0.75rem;
  overflow: hidden;
}

.product-image-slot__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.product-image-slot img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--img-display-scale, 1));
  transform-origin: center center;
}

/* Catalog + browse card text — fixed slots so short/long titles look uniform. */
.product-card-info {
  display: flex;
  flex-direction: column;
  min-height: 7.5rem;
}

.product-card-info--browse {
  min-height: 6.5rem;
}

.product-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: calc(1.375em * 3);
}

.product-card-info--browse .product-card-title {
  -webkit-line-clamp: 2;
  min-height: calc(1.25em * 2);
}

.product-card-meta {
  min-height: 1.75rem;
}

.product-card-info--browse .product-card-meta {
  min-height: 1.75rem;
}

.product-card-price {
  min-height: 2.5rem;
}

.product-card-info--browse .product-card-price {
  min-height: 2rem;
}

/* Horizontal browse rows: compact cards, equal height within the strip. */
.product-browse-cell {
  min-height: 100%;
}

.product-browse-cell .product-image-slot {
  aspect-ratio: 1 / 1;
  max-height: 9.5rem;
  padding: 0.4rem;
}

@media (min-width: 640px) {
  .product-browse-cell .product-image-slot {
    max-height: 10.5rem;
  }
}

.product-browse-cell .product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.product-browse-cell .product-card-footer {
  margin-top: auto;
}

/* Category browse — company headers: logo OR name (not both), centered */
/* Fixed height, not min-height: logos vary in shape, so a flexible header
   would leave every company row sitting at a different offset. */
.browse-company-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 7.5rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .browse-company-header {
    height: 10.5rem;
  }
}

.browse-company-header__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.browse-company-header__link:hover .browse-company-header__logo,
.browse-company-header__link:focus-visible .browse-company-header__logo {
  opacity: 0.82;
}

/* --browse-logo-height is set per company by products.catalog: every logo is
   scaled to the same artwork area, so a square badge reads as large as a wide
   wordmark instead of shrinking to a coin. */
.browse-company-header__logo {
  display: block;
  height: calc(var(--browse-logo-height, 7.5rem) * 0.7);
  width: auto;
  max-width: min(20rem, 100%);
  object-fit: contain;
  object-position: center;
  transition: opacity 0.2s ease;
}

@media (min-width: 1024px) {
  .browse-company-header__logo {
    height: var(--browse-logo-height, 7.5rem);
    max-width: min(28rem, 100%);
  }
}

.browse-company-header__title {
  margin: 0;
  line-height: 1.2;
}

.browse-company-row {
  min-height: 0;
}

/* Homepage signed-in greeting: .home-hero-welcome in free-shipping-promo.css
   — printed on the hero, under the glass promo label, with no background. */

/* Brand-page path: same fill as the hero so the crumb strip is not a
   white band between the header and Core / Ownat / Wild Side artwork. */
.site-breadcrumbs--teal {
  background: #4aa190;
}

.site-breadcrumbs--orange {
  background: #ff931e;
}
