/* ============================================================
   Carousel — "Our Monthly Offers" (Figma 668:2246).
   A centred Swiper of feature cards on a light-grey ground, framed by the gold
   estate border with a faint botanical decal. The active slide is taller and
   undimmed; its neighbours peek in from the sides. CTAs reuse the theme-global
   .link-arrow (a white variant on the dark cards).
   ============================================================ */
.carousel {
  --dpx: calc(100vw / 1920);   /* viewport-proportional unit for the edge decal */
  position: relative;
  overflow: hidden;
  background: #EDEDEF;
  padding: calc(70 / var(--root-font-size) * 1rem) 0 calc(64 / var(--root-font-size) * 1rem);
}

/* The gold estate frame is the shared, image-free .est-frame (see main.css) —
   the same border used on Carousel - Tabs. Lift it above the botanical decal
   (which is z-index 1) so the gold border reads over the leaves. */
.carousel .est-frame { z-index: 2; }

/* ---- faint botanical decal, lower-left, bleeding off the edge (Figma
   668:2247: 1245×1245 at x=-381, y=110 within the 1921-wide section) ---- */
.carousel__leaves {
  position: absolute;
  z-index: 1;
  left: calc(-381 * var(--dpx));
  top: calc(110 * var(--dpx));
  width: calc(1245 * var(--dpx));
  height: calc(1245 * var(--dpx));
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.9;
  pointer-events: none;
}

/* ---- title (centred within a readable column, above the frame) ---- */
.carousel__title {
  position: relative;
  z-index: 2;
  max-width: calc(1626 / var(--root-font-size) * 1rem);
  margin: 0 auto calc(30 / var(--root-font-size) * 1rem);
  padding: 0 calc(24 / var(--root-font-size) * 1rem);
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-size: calc(50 / var(--root-font-size) * 1rem);
  line-height: calc(60 / var(--root-font-size) * 1rem);
  color: #3F434B;
  text-align: center;
}
@media screen and (max-width: 1024px) {
  .carousel__title {
    font-size: calc(35 / var(--root-font-size) * 1rem);
    line-height: calc(40 / var(--root-font-size) * 1rem);
  }
}

/* ---- swiper viewport — full viewport width so the cards run edge-to-edge ---- */
.carousel__viewport {
  position: relative;
  z-index: 3;   /* slides sit above the gold frame (z-index 2) and the decal (1) */
  width: 100%;
  overflow: hidden;
}
.carousel-swiper .swiper-wrapper { align-items: center; }
/* higher specificity than Swiper's base .swiper-slide{width:100%} so the fixed
   slide width wins (required for slidesPerView:'auto' + centeredSlides) */
.carousel .carousel__slide {
  width: calc(791 / var(--root-font-size) * 1rem);
  max-width: 90vw;
}

/* ---- offer card ----
   Uniform height for every card so the row never reflows; the centre-emphasis
   is a GPU transform (no layout change), which keeps swiping smooth and stops
   the height from jumping between slides. Inactive cards scale down to ~0.855
   (=427/501, the design's shorter side card) and mute toward the ground. */
.offer-card {
  position: relative;
  display: block;
  width: 100%;
  height: calc(501 / var(--root-font-size) * 1rem);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transform: scale(0.855);
  transform-origin: center center;
  transition: transform 450ms ease;
}
.carousel__slide.swiper-slide-active .offer-card {
  transform: scale(1);
}
.offer-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* bottom-anchored darkening so the title + link stay legible */
.offer-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.45) 80%, rgba(0,0,0,0.9) 100%);
}
/* neighbours are muted toward the ground until they become active */
.carousel__slide:not(.swiper-slide-active) .offer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(237, 237, 239, 0.32);
  transition: opacity 450ms ease;
}
.offer-card__body {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(20 / var(--root-font-size) * 1rem);
  padding: calc(29 / var(--root-font-size) * 1rem);
}
.offer-card__title {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-size: calc(32 / var(--root-font-size) * 1rem);
  line-height: calc(40 / var(--root-font-size) * 1rem);
  color: #fff;
  margin: 0;
}
@media screen and (max-width: 1024px) {
  .offer-card__title {
    font-size: calc(22 / var(--root-font-size) * 1rem);
    line-height: calc(28 / var(--root-font-size) * 1rem);
  }
}
.offer-card__cta { flex: 0 0 auto; }

/* ---- white .link-arrow variant for the dark cards ----
   Doubled class (.link-arrow.link-arrow--light) so these beat the base
   .link-arrow rules in main.css regardless of stylesheet order. */
.link-arrow.link-arrow--light span { color: #fff; }
.link-arrow.link-arrow--light::before { background: #3F434B; }
.link-arrow.link-arrow--light::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 41 24' fill='none' stroke='%23ffffff' stroke-width='1.5'%3E%3Cpath d='M0 12H40'/%3E%3Cpath d='M33 6l7 6-7 6'/%3E%3C/svg%3E");
}
/* the card is the link, so the diamond cue animates on card hover (not the cue
   itself). The arrow stays its base size — no growth on hover. */
.offer-card:hover .offer-card__cta.link-arrow--light::before { background: transparent; border: 1px solid #fff; }

/* ---- prev / next arrows — square framed buttons (Figma "Arrow" component:
   thin estate border, inset white panel, slim long arrow), flanking the active
   card. Hover inverts to a navy fill with a white border and white arrow. ---- */
.carousel__nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  margin-top: calc(-31.5 / var(--root-font-size) * 1rem);
  width: calc(63 / var(--root-font-size) * 1rem);
  height: calc(63 / var(--root-font-size) * 1rem);
  padding: 0;
  border: 0;
  background: transparent no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='63' height='63' viewBox='0 0 63 63' fill='none'%3E%3Cpath d='M62.5 0.5V62.5H0.5V0.5H62.5Z' stroke='%233F434B'/%3E%3Cpath d='M59 4V59H4V4H59Z' fill='%23fff'/%3E%3Cpath d='M46.8592 31.8271L37.3452 40.8662C37.1575 41.0446 36.8445 41.0446 36.6567 40.8662C36.4689 40.6878 36.4689 40.3905 36.6567 40.2121L45.2944 31.946H15.5007C15.1878 31.946 15 31.7676 15 31.4703C15 31.2324 15.1878 30.9945 15.5007 30.9945H45.2944L36.6567 22.7879C36.4689 22.6095 36.4689 22.3122 36.6567 22.1338C36.8445 21.9554 37.1575 21.9554 37.3452 22.1338L46.8592 31.1729C47.0469 31.3513 47.0469 31.6487 46.8592 31.8271Z' fill='%233F434B'/%3E%3C/svg%3E");
  cursor: pointer;
}
/* the inverted hover art crossfades in over the default on a soft 0.3s ease */
.carousel__nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='63' height='63' viewBox='0 0 63 63' fill='none'%3E%3Cpath d='M62.5 0.5V62.5H0.5V0.5H62.5Z' stroke='%233F434B'/%3E%3Cpath d='M59 4V59H4V4H59Z' fill='%233F434B'/%3E%3Cpath d='M46.8592 31.8271L37.3452 40.8662C37.1575 41.0446 36.8445 41.0446 36.6567 40.8662C36.4689 40.6878 36.4689 40.3905 36.6567 40.2121L45.2944 31.946H15.5007C15.1878 31.946 15 31.7676 15 31.4703C15 31.2324 15.1878 30.9945 15.5007 30.9945H45.2944L36.6567 22.7879C36.4689 22.6095 36.4689 22.3122 36.6567 22.1338C36.8445 21.9554 37.1575 21.9554 37.3452 22.1338L46.8592 31.1729C47.0469 31.3513 47.0469 31.6487 46.8592 31.8271Z' fill='%23fff'/%3E%3C/svg%3E");
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.carousel__nav:hover::before,
.carousel__nav:focus-visible::before { opacity: 1; }
.carousel__nav--prev {
  left: 50%;
  margin-left: calc((-395.5 - 8 - 63) / var(--root-font-size) * 1rem);
  transform: rotate(180deg);
}
.carousel__nav--next {
  left: 50%;
  margin-left: calc((395.5 + 8) / var(--root-font-size) * 1rem);
}
.carousel__nav.swiper-button-disabled { opacity: 0; pointer-events: none; }

/* ---- See All link — centred below the carousel ----
   (.carousel prefix so display:flex beats the base .link-arrow{inline-flex};
   margin-inline:auto only centres a block/flex box, not an inline one) */
.carousel a.carousel__seeall {
  position: relative;
  z-index: 2;
  display: flex;
  width: fit-content;
  margin: calc(28 / var(--root-font-size) * 1rem) auto 0;
}

/* ---- pagination — mobile only (diamonds, per the design) ---- */
.carousel__pagination { display: none; }

/* ---- mobile: one card, no arrows, diamond pagination, more breathing room ---- */
@media screen and (max-width: 1024px) {
  .carousel {
    padding: calc(74 / var(--root-font-size) * 1rem) 0 calc(60 / var(--root-font-size) * 1rem);
  }
  .carousel__leaves { display: none; }
  .carousel__title { margin-bottom: calc(53 / var(--root-font-size) * 1rem); }
  /* narrower card so the previous & next slides peek in on both sides */
  .carousel .carousel__slide { width: 74vw; max-width: 74vw; }
  /* landscape card (matches the design + the offer image crop) instead of a
     fixed height that forced the image into a portrait box; full-size, no shrink */
  .carousel .offer-card {
    height: auto;
    aspect-ratio: 791 / 501;
    transform: none;
  }
  /* the whole card is the link on mobile — hide the separate View Offer cue */
  .carousel .offer-card__cta { display: none; }

  /* arrows are removed on mobile — swipe + dots instead */
  .carousel__nav { display: none; }

  /* three classes so it beats Swiper's .swiper-pagination absolute positioning
     and stays in normal flow, above the See All link */
  .carousel .carousel__pagination.swiper-pagination {
    display: flex;
    position: static;
    bottom: auto;
    left: auto;
    width: auto;
    justify-content: center;
    gap: calc(18 / var(--root-font-size) * 1rem);
    margin-top: calc(34 / var(--root-font-size) * 1rem);
  }
  /* grey outline diamonds; the active one fills dark (per the design) */
  .carousel__pagination .swiper-pagination-bullet {
    width: calc(9 / var(--root-font-size) * 1rem);
    height: calc(9 / var(--root-font-size) * 1rem);
    margin: 0 !important;
    background: transparent;
    border: 1px solid #b8b8bc;
    border-radius: 0;
    transform: rotate(45deg);
    opacity: 1;
    transition: background 200ms ease-out, border-color 200ms ease-out;
  }
  .carousel__pagination .swiper-pagination-bullet-active {
    background: #3F434B;
    border-color: #3F434B;
  }
}
