/**
 * dex.css — LYKON custom styles
 * Load after Tailwind; use for overrides & patterns not covered by utilities.
 */

:root {
  --lykon-cream: #fdf8ee;
  --lykon-brown: #3e2723;
  --lykon-navy: #1a237e;
  --lykon-accent-blue: #28248e;
  --lykon-red: #8b0000;
  --lykon-gold: #c5a028;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Focus: clearer keyboard outline for links & buttons */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lykon-navy);
  outline-offset: 3px;
}

/* Optional: container max width helper */
.lykon-container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.hero {
  background: linear-gradient(135deg, #fef9e7 0%, #fdf3d0 60%, #fce8a8 100%);
}

/* Hero background fade slider (index hero) */
.hero-bg-slider .hero-bg-slide {
  will-change: opacity;
}

/* Hero left headline — true italic (Montserrat ital loaded) */
.hero-heading {
  font-style: italic;
  text-shadow: 5px 5px 5px #c9ab45;
}

/* Made to delight — banner headline: heavier display weight + slight depth */
.delight-headline {
  letter-spacing: 0.045em;
  word-spacing: 0.1em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 12px rgba(62, 39, 35, 0.08);
}

/* Typewriter caret */
.hero-tw-cursor {
  display: none;
  margin-left: 0.08em;
  width: 0;
  height: 0.72em;
  vertical-align: -0.08em;
  border-right: 0.11em solid currentColor;
  animation: hero-tw-blink 0.65s step-end infinite;
}

.hero-tw-cursor--on {
  display: inline-block;
}

.hero-tw-cursor--para {
  height: 1em;
  border-right-width: 2px;
}

.hero-tw-text,
.hero-tw-para-text {
  display: inline;
}

@keyframes hero-tw-blink {
  50% {
    border-color: transparent;
  }
}

/* Counting-style reveal: each character pops in like a tick */
.hero-tw-char {
  display: inline-block;
  animation: hero-tw-count 0.2s cubic-bezier(0.33, 1.45, 0.64, 1) both;
}

.hero-tw-char--para {
  animation-name: hero-tw-count-para;
  animation-duration: 0.14s;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes hero-tw-count {
  0% {
    transform: translateY(0.4em) scale(0.25);
    opacity: 0;
    filter: blur(3px);
  }
  55% {
    transform: translateY(-0.08em) scale(1.12);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes hero-tw-count-para {
  0% {
    transform: translateY(0.2em) scale(0.85);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.productsbg {
  background: #eac55e;
}

@media (min-width: 768px) {
  .lykon-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Hero product cards — biscuit photo inset (packaging-style round window) */
.hero-pack-biscuit {
  position: relative;
  aspect-ratio: 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 9999px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-pack-biscuit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.12);
  transition: transform 0.45s ease;
}

.hero-pack-biscuit--choco {
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

.hero-pack-biscuit--butter {
  border: 2px solid rgba(176, 134, 40, 0.95);
  box-shadow:
    0 12px 28px rgba(120, 80, 0, 0.35),
    inset 0 0 0 1px rgba(255, 248, 225, 0.35);
}

.hero-pack-biscuit--marie {
  border: 2px solid rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-pack-card:hover .hero-pack-biscuit img {
    transform: scale(1.18);
    transition: transform 0.45s ease;
  }
}

/* Our biscuits collection — equal-size cards + pack image */
.product-carousel-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 min(20rem, calc(100% - 0.75rem));
  width: min(20rem, calc(100% - 0.75rem));
  max-width: 100%;
  min-width: 0;
  min-height: 21.5rem;
}

.product-carousel-card .product-slider-pack {
  width: 9.25rem;
  max-width: min(9.25rem, 88%);
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 3 / 5;
  flex-shrink: 0;
}

.product-carousel-card > h3 {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-carousel-card > p {
  flex: 1 1 auto;
  min-height: 2.875rem;
}

.product-carousel-card > button {
  margin-top: auto;
  align-self: center;
}

@media (min-width: 640px) {
  .product-carousel-card {
    flex: 0 0 220px;
    width: 220px;
    max-width: none;
    min-height: 26.5rem;
  }

  .product-carousel-card .product-slider-pack {
    width: 9.875rem;
    max-width: 9.875rem;
  }
}

@media (min-width: 768px) {
  .product-carousel-card {
    flex: 0 0 240px;
    width: 240px;
    min-width: 240px;
    min-height: 27.5rem;
  }

  .product-carousel-card .product-slider-pack {
    width: 10.5rem;
    max-width: 10.5rem;
  }
}

/* Our biscuits collection — slider pack photo (HD crop, pack silhouette) */
.product-slider-pack {
  position: relative;
  overflow: hidden;
  border-radius: 0.875rem;
  box-shadow:
    0 10px 28px rgba(44, 24, 16, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.product-slider-pack::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, transparent 35%, transparent 70%, rgba(0, 0, 0, 0.12) 100%);
  border-radius: inherit;
}

.product-slider-pack img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #fff;
  object-position: center;
  transition: transform 0.5s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .product-slider-pack:hover img {
    transform: scale(1.06);
  }
}

/* Mobile nav: Products accordion chevron */
.nav-products-mobile-chevron {
  transition: transform 0.2s ease;
}

details.nav-products-mobile[open] .nav-products-mobile-chevron {
  transform: rotate(180deg);
}

/* Products catalogue — sticky category strip below site header */
.products-catalog-page .products-catalog-nav {
  top: 3.35rem;
}
@media (min-width: 768px) {
  .products-catalog-page .products-catalog-nav {
    top: 3.65rem;
  }
}
@media (min-width: 1024px) {
  .products-catalog-page .products-catalog-nav {
    top:5.2rem;
  }
}

/* Products catalogue — uniform product image area */
.products-catalog-page .catalog-product-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  padding: 1rem;
  background-color:#fff9f1;
}

.products-catalog-page .catalog-product-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

.products-catalog-page .group:hover .catalog-product-img {
  transform: scale(1.03);
}

/* PDP related slider — clip overflow; min-width:0 so track does not widen the page */
[data-related-carousel] {
  max-width: 100%;
  overflow: hidden;
}
[data-related-track] {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.related-pdp-slide {
  box-sizing: border-box;
  flex: 0 0 11.5rem;
  width: 11.5rem;
}
@media (min-width: 640px) {
  .related-pdp-slide {
    flex: 0 0 13rem;
    width: 13rem;
  }
}

/* Product detail — fullscreen image zoom overlay (plain div, not <dialog>).
   Closed state uses a dedicated class so nothing renders in document flow above the footer. */
#pdp-lightbox.pdp-lightbox--closed {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}
#pdp-lightbox:not(.pdp-lightbox--closed) {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 99999;
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  border: none;
  padding: 0;
  background: rgb(18 14 12 / 0.97);
  color: #fff;
  box-sizing: border-box;
  visibility: visible;
  pointer-events: auto;
}
.pdp-lightbox__stage {
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
}
.pdp-lightbox__stage.is-panning {
  cursor: grabbing;
}
.pdp-lightbox__img {
  transform-origin: center center;
  will-change: transform;
  max-width: 100%;
  cursor: grab;
  -webkit-user-drag: none;
  user-select: none;
}
.pdp-lightbox__stage.is-panning .pdp-lightbox__img {
  cursor: grabbing;
}

/* Product detail page: belt-and-suspenders against stray horizontal overflow */
body.product-detail-page {
  overflow-x: clip;
}
@supports not (overflow: clip) {
  body.product-detail-page {
    overflow-x: hidden;
  }
}
