/* Campaign promos shared by the category landings: banner rows (banner_group), discount codes (coupon_rail) in the
   landing's own colour, and the in-store stores row with its small bottom sheet (instore_rail). Loaded after
   sections.css, so these rules win over the older ones there. Colours come from --ap-accent (base.css). */

/* Campaign banners (banner_group): Swiper row — phone = one banner + a peek, bleeding to the screen edge;
   tablet/desktop = three side by side. Before Swiper loads the same row scrolls natively with snap points. */
.ap-section--bare .ap-section__body { padding: 0; }
.ap-banners { position: relative; }
/* .ap-banners prefix: Swiper's own CSS (.swiper, .swiper-slide) loads later and would win on equal specificity. */
.ap-banners .ap-banners__swiper { margin: 0 calc(-1 * var(--ap-gutter)); padding: 4px 0 10px; }
.ap-banners__track { list-style: none; margin: 0; padding: 0; }
.ap-banners__swiper:not(.swiper-initialized) { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--ap-gutter);
  overscroll-behavior-x: contain; scrollbar-width: none; contain: paint; }
.ap-banners__swiper:not(.swiper-initialized)::-webkit-scrollbar { display: none; }
.ap-banners__swiper:not(.swiper-initialized) > .ap-banners__track { display: flex; gap: 12px; padding-inline: var(--ap-gutter); }
.ap-banners__swiper:not(.swiper-initialized) .ap-banners__item { scroll-snap-align: start; }
.ap-banners .ap-banners__item { flex-shrink: 0; width: calc(100% - 2 * var(--ap-gutter) - 28px); min-width: 0; height: auto; }
.ap-banners__swiper.swiper-initialized { cursor: grab; }
.ap-banners .ap-banner { display: block; border-radius: var(--ap-radius-m); -webkit-user-drag: none; }
.ap-banners .ap-banner img { -webkit-user-drag: none; user-select: none; }
.ap-banners .ap-banner__frame img { background: #f3f3f3; }
.ap-banners__dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.ap-banners__dots[hidden] { display: none; }
.ap-banners__dots i { width: 6px; height: 6px; border-radius: 3px; background: #d4d7de; transition: width 240ms var(--ap-ease), background 240ms ease; }
.ap-banners__dots i.is-on { width: 18px; background: var(--ap-accent, #c2185b); }
.ap-skeleton--banner { width: 86%; aspect-ratio: 1024 / 449; border-radius: var(--ap-radius-m); }
.ap-banners__arrow { display: none; }
@media (min-width: 768px) {
  .ap-banners .ap-banners__swiper { margin: 0; }
  .ap-banners__swiper:not(.swiper-initialized) { scroll-padding-inline: 0; }
  .ap-banners__swiper:not(.swiper-initialized) > .ap-banners__track { gap: 16px; padding-inline: 0; }
  .ap-banners .ap-banners__item { width: calc((100% - 2 * 16px) / 3); }
  .ap-skeleton--banner { width: 100%; aspect-ratio: 2048 / 449; }
  .ap-banners__arrow { display: grid; place-items: center; position: absolute; top: calc(50% - 26px); z-index: 2;
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: #1f2430; cursor: pointer;
    box-shadow: 0 4px 14px rgba(20, 24, 40, .18); transition: opacity 200ms ease; }
  .ap-banners__arrow[hidden] { display: none; }
  .ap-banners__arrow:disabled { opacity: 0; pointer-events: none; }
  .ap-banners__arrow svg { width: 20px; height: 20px; stroke-width: 2.4; }
  .ap-banners__arrow--prev svg { transform: scaleX(-1); }
  .ap-banners__arrow--prev { right: -14px; }
  .ap-banners__arrow--next { left: -14px; }
  .ap-banners__arrow:focus-visible { outline: 2px solid var(--ap-accent, #c2185b); outline-offset: 2px; }
}

/* ---------- Discount codes: short ticket in the landing colour, sideways row ---------- */
.ap-section--coupons, .ap-voucher, .ap-vsheet {
  --ap-v-main: var(--ap-accent, #c2185b);
  --ap-v-light: color-mix(in srgb, var(--ap-v-main) 72%, #fff);
  --ap-v-dark: color-mix(in srgb, var(--ap-v-main) 70%, #000);
  --ap-v-tint: color-mix(in srgb, var(--ap-v-main) 8%, #fff);
}
.ap-swiper .ap-slide--coupon { width: min(244px, calc(100vw - 96px)); }
.ap-skeleton--coupon { width: min(244px, calc(100vw - 96px)); height: 66px; border-radius: 14px; }
.ap-voucher {
  --cut: 76px;
  min-height: 66px; border-radius: 14px;
  background: var(--ap-v-main);
  background: linear-gradient(135deg, var(--ap-v-light) 0%, var(--ap-v-main) 48%, var(--ap-v-dark) 100%);
  -webkit-mask: radial-gradient(circle 7px at var(--cut) 0, #0000 97%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 7px at var(--cut) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 7px at var(--cut) 0, #0000 97%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 7px at var(--cut) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}
.ap-voucher:focus-visible { outline-color: var(--ap-v-light); }
.ap-voucher__body { justify-content: center; gap: 5px; padding: 8px 12px 8px 10px; }
.ap-voucher__store { gap: 6px; }
.ap-voucher__store strong { font-size: .84rem; }
.ap-voucher__logo { width: 22px; height: 22px; }
.ap-voucher__meta { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.ap-voucher__chip { padding: 1px 7px; background: #00000029; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ap-voucher__when { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-voucher__when svg { width: 12px; height: 12px; flex: none; }
.ap-voucher__cta { flex: none; margin: 0 auto 0 0; padding: 0; background: none; color: #fff; display: inline-flex; align-items: center; gap: 2px;
  font-size: .68rem; font-weight: 800; opacity: .92; }
.ap-voucher__cta svg { width: 12px; height: 12px; }
.ap-voucher__stub { padding: 6px 4px; border-inline-start-width: 1.5px; gap: 0; }
.ap-voucher__amount { font-size: 1.45rem; }
.ap-voucher__unit { font-size: .66rem; }
.ap-voucher__amount:only-child { font-size: .86rem; line-height: 1.35; }
.ap-vsheet__title { color: var(--ap-v-main); }
.ap-vsheet__code { border-color: color-mix(in srgb, var(--ap-v-main) 55%, transparent); background: var(--ap-v-tint); }
.ap-vsheet__code code { color: var(--ap-v-dark); }
.ap-vsheet__copy { background: var(--ap-v-main); }

/* ---------- In-store stores (instore_rail): small cards; a tap opens .ap-isheet ---------- */
.ap-swiper .ap-slide--istore { width: 212px; }
.ap-skeleton--istore { width: 212px; height: 64px; border-radius: 14px; }
.ap-istore {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--ap-line);
  border-radius: 14px; background: #fff; color: var(--ap-ink); font: inherit; text-align: start; cursor: pointer;
  transition: border-color .18s ease, transform .18s var(--ap-ease);
}
.ap-istore:hover { border-color: color-mix(in srgb, var(--ap-accent) 45%, var(--ap-line)); }
.ap-istore:active { transform: scale(.98); }
.ap-istore:focus-visible { outline: 2px solid var(--ap-accent); outline-offset: 2px; }
.ap-istore__logo { flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 1px solid var(--ap-line); background: #fff; }
.ap-istore__logo img { width: 100%; height: 100%; object-fit: contain; }
.ap-istore__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ap-istore__name { font-size: .86rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-istore__meta { display: flex; align-items: center; gap: 3px; color: var(--ap-muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-istore__meta svg { flex: none; width: 12px; height: 12px; }
.ap-istore__cb { flex: none; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ap-accent) 10%, #fff);
  color: var(--ap-accent); font-size: .7rem; font-weight: 800; }

.ap-isheet {
  position: fixed; inset: auto 0 0; width: 100%; max-width: 480px; height: var(--sheet-h, 60vh); max-height: 92vh; margin: 0 auto; padding: 0;
  display: flex; flex-direction: column; border: 0; border-radius: 20px 20px 0 0; background: #fff; color: var(--ap-ink); overflow: hidden;
  box-shadow: 0 -10px 36px #10182833; transition: height .26s var(--ap-ease); animation: ap-isheet-in .26s var(--ap-ease);
}
.ap-isheet:not([open]) { display: none; }
.ap-isheet.is-dragging { transition: none; }
.ap-isheet::backdrop { background: #0f172a66; animation: ap-isheet-fade .2s ease; }
.ap-isheet.is-closing { transform: translateY(100%); transition: transform .22s ease-in; }
.ap-isheet.is-closing::backdrop { opacity: 0; transition: opacity .22s; }
@keyframes ap-isheet-in { from { transform: translateY(100%); } }
@keyframes ap-isheet-fade { from { opacity: 0; } }
.ap-isheet__grab { flex: none; display: grid; place-items: center; padding: 9px 0 4px; touch-action: none; cursor: grab; }
.ap-isheet__grab span { width: 38px; height: 4px; border-radius: 4px; background: #d5dae3; }
.ap-isheet__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ap-isheet__content { display: grid; gap: 12px; padding: 2px 16px calc(16px + var(--ap-safe-bottom)); }
.ap-isheet__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; touch-action: none; cursor: grab; }
.ap-isheet__logo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 1px solid var(--ap-line); background: #fff; }
.ap-isheet__logo img { width: 100%; height: 100%; object-fit: contain; }
.ap-isheet__title { min-width: 0; }
.ap-isheet__title h2 { margin: 0; font-size: 1rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-isheet__title p { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ap-isheet__chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--ap-surface);
  color: var(--ap-muted); font-size: .7rem; font-weight: 700; }
.ap-isheet__chip svg, .ap-isheet__chip img { width: 12px; height: 12px; }
.ap-isheet__chip--cb { background: color-mix(in srgb, var(--ap-accent) 10%, #fff); color: var(--ap-accent); }
.ap-isheet__close { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ap-surface); color: var(--ap-ink); cursor: pointer; }
.ap-isheet__close svg { width: 16px; height: 16px; }
.ap-isheet__how { margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ap-accent) 7%, #fff);
  color: color-mix(in srgb, var(--ap-accent) 75%, #000); font-size: .76rem; font-weight: 600; }
.ap-isheet__note { margin: 0; color: var(--ap-muted); font-size: .8rem; text-align: center; padding: 8px 0; }
.ap-ibranches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-ibranch { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--ap-line); border-radius: 12px; }
.ap-ibranch__text { display: grid; gap: 3px; min-width: 0; }
.ap-ibranch__text p { margin: 0; }
.ap-ibranch__name { font-size: .84rem; font-weight: 800; }
.ap-ibranch__meta { display: flex; align-items: center; gap: 4px; color: var(--ap-muted); font-size: .72rem; }
.ap-ibranch__meta svg { flex: none; width: 12px; height: 12px; }
.ap-ibranch__address { color: var(--ap-ink); font-size: .76rem; line-height: 1.7; }
.ap-ibranch__actions { display: flex; gap: 6px; }
.ap-ibranch__btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ap-line);
  color: var(--ap-ink); font-size: .74rem; font-weight: 800; text-decoration: none; }
.ap-ibranch__btn svg { width: 14px; height: 14px; }
.ap-ibranch__btn--main { border-color: transparent; background: var(--ap-accent); color: #fff; }
.ap-isheet__site { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: 12px;
  border: 1px solid var(--ap-line); color: var(--ap-ink); font-size: .84rem; font-weight: 800; text-decoration: none; }
.ap-isheet__site svg { width: 15px; height: 15px; }
@media (min-width: 768px) {
  .ap-isheet { bottom: 20px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-isheet, .ap-isheet::backdrop { animation: none; transition: none; }
}
