/* =====================================================================
   Product slider.
   Built on CSS scroll-snap rather than a carousel library: touch, trackpad
   and keyboard all work with no JavaScript at all, and it costs no extra
   download. V1 loaded Swiper (~140 KB) for the same job.
   The arrows and dots in main.js are an enhancement on top.
   ===================================================================== */

.pslider { position: relative; }

.pslider__head { display: flex; align-items: flex-end; gap: 1.5rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.pslider__head .sec-head { margin-bottom: 0; flex: 1; }

/* ---------- arrows ---------- */
.pslider__nav { display: none; gap: .6rem; flex: none; padding-bottom: .25rem; }
@media (min-width: 768px) { .pslider__nav { display: flex; } }
.pslider__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.pslider__btn svg { width: 20px; height: 20px; }
.pslider__btn:hover:not(:disabled) {
  background: var(--brand); border-color: var(--brand); color: #fff;
  transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,31,154,.25);
}
.pslider__btn:disabled { opacity: .32; cursor: default; }
/* the arrow glyph mirrors with the layout */
[dir="rtl"] .pslider__btn svg { transform: scaleX(-1); }

/* ---------- track ---------- */
.pslider__track {
  display: flex; gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* the cards lift on hover, so the row needs room above and below */
  padding-block: 6px 14px;
  /* bleed to the screen edge on phones — a card cut off at the edge is the
     clearest possible signal that the row scrolls */
  margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut);
  scrollbar-width: none; -ms-overflow-style: none;
}
.pslider__track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .pslider__track { margin-inline: 0; padding-inline: 0; } }
@media (prefers-reduced-motion: reduce) { .pslider__track { scroll-behavior: auto; } }

.pslide { flex: 0 0 85%; scroll-snap-align: start; min-width: 0; display: flex; }
@media (min-width: 620px)  { .pslide { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (min-width: 1000px) { .pslide { flex-basis: calc((100% - 2.5rem) / 3); } }

/* ---------- card ---------- */
.pcard {
  display: flex; flex-direction: column; height: 100%;
  overflow: hidden; border-radius: 18px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(12,21,36,.06);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.pcard:hover {
  transform: translateY(-6px); border-color: var(--blue-100);
  box-shadow: 0 22px 46px rgba(12,21,36,.16);
}

/* The pack sits on a soft tinted panel, contained, never cropped. */
.pcard__media {
  position: relative; aspect-ratio: 4 / 3.1;
  background: linear-gradient(155deg, #F4F8FE 0%, #E7EEFA 100%);
  display: grid; place-items: center;
  padding: 1.5rem 1.4rem;
  border-bottom: 1px solid var(--line-soft);
}
.pcard__media img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(12,21,36,.16));
  transition: transform .55s var(--ease);
}
.pcard:hover .pcard__media img { transform: scale(1.05) translateY(-3px); }

.pcard__tag {
  position: absolute; top: .95rem; inset-inline-start: .95rem; z-index: 2;
  padding: .32rem .75rem; border-radius: 100px;
  background: rgba(255,255,255,.85); border: 1px solid rgba(0,31,154,.12);
  backdrop-filter: blur(6px);
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--brand);
}

.pcard__body {
  flex: 1; display: flex; flex-direction: column;
  padding: 1.3rem 1.35rem 1.4rem;
}
.pcard__title { font-size: 1.18rem; font-weight: 700; line-height: 1.25; margin-bottom: .4rem; color: var(--ink); }
.pcard__text { font-size: .92rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* margin-top:auto pins this to the bottom, so the link lines up across cards
   however long each blurb happens to be */
.pcard__more {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: auto; padding-top: 1rem;
  font-size: .92rem; font-weight: 600; color: var(--brand);
}
.pcard__more svg { width: 1.05em; height: 1.05em; }
.pcard:hover .pcard__more { color: var(--brand-2); }
.pcard:hover .pcard__more .arw { transform: translateX(4px); }

/* ---------- dots ---------- */
.pslider__dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.75rem; }
.pslider__dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 100px;
  background: var(--line); cursor: pointer;
  transition: width .25s var(--ease), background .25s var(--ease);
}
.pslider__dot.is-on { width: 30px; background: var(--brand); }

.pslider__foot { display: flex; justify-content: center; margin-top: 2rem; }

/* =====================================================================
   Certification slider — same track, different card.
   Certificates are portrait documents, so the card is portrait and the
   scan is contained, never cropped. Clicking one opens it full size:
   a certificate a buyer cannot read proves nothing.
   ===================================================================== */
.pslider__nav--center { justify-content: center; margin-top: 1.5rem; padding-bottom: 0; }
@media (min-width: 768px) { .pslider__nav--center { display: flex; } }

.cslide { flex: 0 0 68%; scroll-snap-align: start; min-width: 0; display: flex; }
@media (min-width: 560px)  { .cslide { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (min-width: 860px)  { .cslide { flex-basis: calc((100% - 2.5rem) / 3); } }
@media (min-width: 1120px) { .cslide { flex-basis: calc((100% - 3.75rem) / 4); } }

.ccard {
  position: relative; width: 100%;
  display: block; padding: 1rem; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; cursor: zoom-in; overflow: hidden;
  box-shadow: 0 4px 16px rgba(12,21,36,.05);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.ccard:hover { transform: translateY(-5px); border-color: var(--blue-100); box-shadow: 0 18px 38px rgba(12,21,36,.14); }
.ccard img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: contain;
  transition: transform .45s var(--ease);
}
.ccard:hover img { transform: scale(1.03); }

.ccard__zoom {
  position: absolute; inset-inline-end: 1rem; bottom: 1rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.ccard__zoom svg { width: 17px; height: 17px; }
.ccard:hover .ccard__zoom, .ccard:focus-visible .ccard__zoom { opacity: 1; transform: none; }
@media (hover: none) { .ccard__zoom { opacity: 1; transform: none; } }

/* ---------- lightbox ---------- */
.lbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  background: rgba(7,20,38,.9); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
}
.lbox.is-open { opacity: 1; visibility: visible; }
.lbox img {
  max-width: 100%; max-height: 92vh; width: auto; border-radius: 10px;
  background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transform: scale(.96); transition: transform .3s var(--ease);
}
.lbox.is-open img { transform: none; }
.lbox__close {
  position: absolute; top: 18px; inset-inline-end: 18px;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.lbox__close:hover { background: rgba(255,255,255,.22); }
.lbox__close svg { width: 22px; height: 22px; }

/* =====================================================================
   Client logo slider — six across on a desktop.
   The logos are supplied at mixed sizes and on mixed backgrounds, so each
   sits in an equal white tile and is contained rather than stretched.
   ===================================================================== */
.lslider__track { align-items: stretch; }

.lslide { flex: 0 0 46%; scroll-snap-align: start; min-width: 0; display: flex; }
@media (min-width: 520px)  { .lslide { flex-basis: calc((100% - 2.5rem) / 3); } }
@media (min-width: 768px)  { .lslide { flex-basis: calc((100% - 3.75rem) / 4); } }
@media (min-width: 1100px) { .lslide { flex-basis: calc((100% - 6.25rem) / 6); } }

.lcard {
  width: 100%; display: grid; place-items: center;
  padding: 1.15rem 1rem; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.lcard:hover { border-color: var(--blue-100); box-shadow: 0 12px 26px rgba(12,21,36,.1); transform: translateY(-3px); }
.lcard img {
  width: 100%; height: 56px; object-fit: contain;
  /* grey by default so eight different brand palettes don't fight each other;
     full colour on hover */
  filter: grayscale(1); opacity: .62;
  transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.lcard:hover img { filter: none; opacity: 1; }

/* ---------- pack sizes on the product card ----------
   Already in site.php and shown nowhere. It is the first thing a distributor
   checks, so it sits directly under the blurb rather than on the inner page. */
.pcard__packs { display: block; margin-top: .85rem; }
.pcard__packs-label {
  display: block; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: .4rem;
}
.pcard__packs-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.pcard__packs-list b {
  font-size: .72rem; font-weight: 600; color: var(--navy-700);
  background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: .18rem .45rem; border-radius: 5px;
}
