/**
 * Zelmart — WCAG AA color-contrast overrides (Lighthouse / axe).
 * Loaded after dynamic_stylesheet + oct_stickers so theme regenerates do not wipe fixes.
 */

/*
 * Fonts: oct-fonts-*.css arrives late (footer JS). PSI cold visit → swap CLS ~0.5.
 * Early @font-face + font-display:optional = no late swap of main content.
 */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url('fonts/rubik-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('fonts/rubik-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('fonts/rubik-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('fonts/rubik-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('fontawesome/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: optional;
  src: url('fontawesome/webfonts/fa-solid-900.woff2') format('woff2');
}

:root {
  /* was rgb(167 174 165) ≈ 2.3:1 on white → ~5.9:1 */
  --ds-light-text-color-light: #5f675a;
  /* was #52BB38 / rgb(82,187,56) ≈ 2.5:1 on white → ~5.4:1 */
  --ds-green-color: #1f7a3f;
  --ds-interactive-color: #1f7a3f;
}

/* Footer / header accent links were rgb(213,138,0) ≈ 2.8:1 on white → ~5.0:1 */
.ds-footer .blue-link,
.ds-footer .blue-link:hover,
.ds-dropdown-links .blue-link,
.ds-dropdown-links .blue-link:hover,
.ds-switcher button {
  color: #a35f00;
}

/* Popular sticker: white on rgb(53,154,238) ≈ 3.0:1 → ~5.4:1 */
.ds-module-sticker-stickers_popular {
  background: #1570a6;
  color: #fff;
}

/* --------------------------------------------------------------------------
 * Target size (WCAG 2.2 / axe target-size): min 24×24 CSS px + no overlap
 * 1) Product actions were ~15px with .p-0 and sat ON TOP of the image <a>
 *    → axe fails spacing even if buttons alone are ≥24px.
 * 2) Swiper bullets were 8×8.
 * -------------------------------------------------------------------------- */

.ds-module-buttons {
  gap: 0.5rem;
  padding: 0.25rem;
  z-index: 11;
}

.ds-module-buttons .ds-module-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0.375rem !important; /* overrides Bootstrap .p-0 */
}

/*
 * Reserve a non-link column for absolute action buttons so bounding boxes
 * do not intersect the product image link (axe target-size spacing).
 */
.ds-module-img-box > a.d-block {
  box-sizing: border-box;
  width: calc(100% - 2.75rem);
  max-width: calc(100% - 2.75rem);
  margin-left: 0 !important;
  margin-right: auto !important;
  aspect-ratio: 1 / 1; /* CLS: reserve square before thumb loads */
}

.ds-module[data-type="split"] .ds-module-img-box > a.d-block {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Keep 8px visual dot, expand hit area to 24×24 with horizontal gap */
.swiper-pagination-bullet {
  box-sizing: border-box;
  width: 24px !important;
  height: 24px !important;
  margin: 0 8px !important;
  background: transparent !important;
  opacity: 1 !important;
  position: relative;
  transform: none !important;
}

.swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--ds-light-text-color, #5f675a);
  transition: background-color var(--ds-main-transition, 0.2s), transform var(--ds-main-transition, 0.2s);
}

.swiper-pagination-bullet-active::before,
.ds-slideshow .swiper-pagination-bullet-active::before,
.ds-product-images-main .swiper-pagination-bullet-active::before {
  background: var(--ds-secondary-dark-color, #00171f);
  transform: scale(1.25);
}

.ds-slideshow .swiper-pagination-bullet,
.ds-product-images-main .swiper-pagination-bullet {
  background: transparent !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
 * CLS: reserve slideshow box before img decode; kill theme max-height:100%.
 * Desktop full-img is 1920×673; mobile <picture> uses 380×640 — must not share
 * the desktop ratio or Swiper overflow clips the portrait banner.
 * -------------------------------------------------------------------------- */

.ds-slideshow-item-full-img,
.ds-slideshow-plus-item-fullimg,
.ds-slideshow-item-full-img > a,
.ds-slideshow-item-full-img picture {
  display: block;
  width: 100%;
  aspect-ratio: 1920 / 673;
}

@media (max-width: 767px) {
  .ds-slideshow-item-full-img,
  .ds-slideshow-plus-item-fullimg,
  .ds-slideshow-item-full-img > a,
  .ds-slideshow-item-full-img picture {
    aspect-ratio: 380 / 640;
  }
}

.ds-slideshow-item-full-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none !important;
}

.ds-slideshow .swiper-wrapper.mb-5 {
  margin-bottom: 3rem; /* keep pagination gutter; ratio is on the slide */
}

.ds-module-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

#logo {
  aspect-ratio: 423 / 86;
  height: auto;
}
