/**
 * Global shell + home page styles (reference Tailwind utilities are reused; this file
 * only adds state helpers, carousel fallbacks and small fixes).
 * Owner: theme-frontend.
 */
body.ed-scroll-locked { overflow: hidden; }

/* ------------------------------------------------------------------ *
 * header states
 * ------------------------------------------------------------------ */
[data-ed-header] { transition-property: color, background-color, fill; }
[data-ed-header].is-solid,
[data-ed-header].is-mega-open {
  background-color: var(--color-white);
  color: var(--color-black);
}
[data-ed-header].is-solid g,
[data-ed-header].is-mega-open g { fill: var(--color-black); }
@media (min-width: 1024px) {
  [data-ed-header][data-ed-home]:not(.is-solid):not(.is-mega-open) g { fill: var(--color-white); }
}
[data-ed-header].is-solid nav button,
[data-ed-header].is-solid nav span,
[data-ed-header].is-mega-open nav button,
[data-ed-header].is-mega-open nav span { color: var(--color-black); }
[data-ed-header].is-solid nav a,
[data-ed-header].is-mega-open nav a { color: inherit; }

/* mega menu backdrops: animate height/colour */
.header-backdrop {
  transition-property: height, background-color, border-color;
  transition-duration: .15s;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
}
.mega-menu-backdrop {
  transition-property: height, background-color;
  transition-duration: .2s;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
}
[data-ed-header].is-mega-open .header-backdrop {
  background-color: var(--color-white);
  border-color: var(--color-c-light-gray);
}
[data-ed-header].is-mega-open .mega-menu-backdrop { background-color: var(--color-white); }
@media (max-width: 1023.98px) {
  .header-backdrop,
  .mega-menu-backdrop { display: none !important; }
}

/* mobile drawer always animatable (it is rendered off-canvas) */
[data-ed-mobile-menu] { transition-property: right, opacity; will-change: right, opacity; }
/* The off-canvas drawer keeps the reference `opacity-0` utility class even at desktop,
   where it becomes the normal nav bar; disable pointer events on mobile only, otherwise
   every desktop header link/button is unclickable. */
@media (max-width: 1023.98px) {
  [data-ed-mobile-menu].opacity-0 { pointer-events: none; }
}
@media (min-width: 1024px) {
  [data-ed-mobile-menu] { right: auto !important; opacity: 1 !important; pointer-events: auto !important; }
}

/* footer language switch (reference places its locale selector bottom-right) */
[data-ed-footer-lang] [data-ed-current="true"] { text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 1024px) {
  [data-ed-footer-lang] { display: flex; align-self: flex-end; justify-content: flex-end; }
}

/* ------------------------------------------------------------------ *
 * product carousel fallbacks (the reference CSS ships these rules only for
 * `@media (scripting: none)`; our static markup needs them when JS is on)
 * ------------------------------------------------------------------ */
.product-carousel .swiper { overflow: hidden; }
.product-carousel .swiper-wrapper { display: flex; gap: 8px; }
.product-carousel .swiper-slide {
  flex: 0 0 calc(71.4286% - 2.28571px);
  width: auto !important;
  height: auto !important;
  margin-right: 0 !important;
}
@media (min-width: 425px) {
  .product-carousel .swiper-slide { flex-basis: calc(45.4545% - 4.36364px); }
}
@media (min-width: 460px) {
  .product-carousel .swiper-slide { flex-basis: calc(41.6667% - 4.66667px); }
}
@media (min-width: 768px) {
  .product-carousel .swiper-wrapper { gap: 16px; }
  .product-carousel .swiper-slide { flex-basis: calc(31.25% - 11px); }
}
@media (min-width: 1024px) {
  .product-carousel .swiper-slide { flex-basis: calc(22.7273% - 12.3636px); }
}
@media (min-width: 1290px) {
  .product-carousel .swiper-slide { flex-basis: calc(19.2308% - 12.9231px); }
}
.product-carousel .swiper { scroll-behavior: smooth; scrollbar-width: none; }
.product-carousel .swiper::-webkit-scrollbar { display: none; }
.product-carousel .swiper-pagination { display: flex; position: absolute; }
.product-carousel .swiper-button { display: flex; }

/* inspiration feed (reference styles the non-initialised state; we only add scrolling) */
html .swiper-inspiration-feed.swiper:not(.swiper-initialized) { overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none; }
html .swiper-inspiration-feed.swiper:not(.swiper-initialized)::-webkit-scrollbar { display: none; }

/* slideshow static fallback (reference rules only under scripting:none) */
.slideshow-carousel .swiper,
.swiper.slideshow-swiper { overflow: hidden; }
.slideshow-carousel .swiper-wrapper { display: flex; flex-wrap: nowrap; }
.slideshow-carousel .swiper-slide {
  flex: 0 0 100%;
  width: 100% !important;
  height: 100% !important;
  margin-right: 0 !important;
  transition: transform .4s ease;
}

/* ------------------------------------------------------------------ *
 * product card quick shop (hover reveal, mirrors reference behaviour)
 * ------------------------------------------------------------------ */
.product-card .product-card-quick-shop > div {
  pointer-events: none;
  opacity: 0;
  transform: translateX(16px);
}
.product-card:is(:hover, :focus-within) .product-card-quick-shop > div {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}
.product-card .product-card-quick-shop > div > button {
  opacity: 0;
  transition: opacity .75s;
}
.product-card:is(:hover, :focus-within) .product-card-quick-shop > div > button { opacity: 1; }

/* price block (struck-through regular + sale price) — inline so the line box matches the
   reference single-price line height exactly (avoids fractional row drift in the grid) */
.ed-price { display: inline; white-space: nowrap; }
.ed-price__regular { text-decoration: line-through; opacity: .5; margin-right: .3em; }
.ed-price__sale { font-weight: 400; }
.product-card-details .ed-price { display: inline; font-size: .75rem; line-height: 1; }
@media (min-width: 1024px) {
  .product-card-details .ed-price { font-size: .875rem; }
}

/* ------------------------------------------------------------------ *
 * search overlay
 * ------------------------------------------------------------------ */
[data-ed-search-overlay] > [data-ed-search-close] { background-color: rgba(0, 0, 0, .25); }
[data-ed-search-overlay] [role="dialog"] {
  width: 100%;
  max-width: 579px;
  margin-left: auto;
  background: #fff;
  box-shadow: -1px 0 0 rgba(0, 0, 0, .06);
}
[data-ed-search-overlay] [data-ed-search-suggestion] { display: inline-block; }
[data-ed-search-overlay] ul > li + li { margin-top: .875rem; }
[data-ed-search-overlay] .ed-search-close { cursor: pointer; }
[data-ed-search-overlay] input[type="search"]::-webkit-search-cancel-button { display: none; }

/* loaded-state small fixes */
.ed-main { display: block; }

/* ------------------------------------------------------------------ *
 * mega menu promo image tiles (dimensions from the reference capture)
 * ------------------------------------------------------------------ */
[data-ed-nav-images] > div { display: flex; gap: 10px; }
[data-ed-nav-images] > div > a {
  display: block;
  width: 142px;
  flex: 0 0 auto;
  text-align: center;
  color: inherit;
}
[data-ed-nav-images] > div > a > div {
  position: relative;
  margin-bottom: .625rem;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1rem;
}
[data-ed-nav-images] > div > a > div > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-ed-nav-images] > div > a > p {
  font-family: var(--font-serif);
  font-size: .875rem;
}
@media (min-width: 1024px) {
  [data-ed-nav-images] > div > a { width: 236px; }
  [data-ed-nav-images] > div > a > p { font-size: 1.25rem; }
}
