/* ===========================================================================
 * Storefront design language (homepage + single product page)
 * ---------------------------------------------------------------------------
 * Only brand CSS variables are used, so the admin theme colours keep working.
 * Loaded before theme.css so any dynamic admin override still wins.
 * ======================================================================== */

:root {
  --sf-line: rgba(15, 23, 42, 0.08);
  --sf-line-strong: rgba(15, 23, 42, 0.14);
  --sf-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -18px rgba(15, 23, 42, 0.35);
  --sf-card-shadow-hover: 0 2px 6px rgba(15, 23, 42, 0.06), 0 18px 40px -22px rgba(15, 23, 42, 0.45);
  --sf-radius: 14px;
  --sf-muted: #64748b;
}

/* --------------------------- section rhythm ----------------------------- */
.s-block { scroll-margin-top: 5rem; }

.sf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--sf-line);
  padding-bottom: 0.65rem;
  margin-bottom: 1.15rem;
}
.sf-head h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-secondary, #0f172a);
}
@media (min-width: 640px) { .sf-head h2 { font-size: 1.35rem; } }
.sf-head-link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand, #16a34a);
}
.sf-head-link:hover { text-decoration: underline; }

/* ---------------------------- product grid ------------------------------ */
.product-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .product-grid { gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .product-grid { gap: 1.15rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.product-card {
  border-radius: var(--sf-radius);
  border-color: var(--sf-line);
  box-shadow: var(--sf-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.product-card:hover {
  box-shadow: var(--sf-card-shadow-hover);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand, #16a34a) 30%, transparent);
}
.product-card .pc-price { letter-spacing: -0.02em; }
.product-card .product-order-btn {
  border-color: color-mix(in srgb, var(--brand, #16a34a) 35%, transparent);
  color: var(--brand, #16a34a);
  font-weight: 700;
  border-radius: 9999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.product-card .product-order-btn:hover {
  background: var(--brand, #16a34a);
  color: #fff;
}
@media (max-width: 480px) {
  .product-card .pc-foot { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .product-card .product-order-btn { justify-content: center; width: 100%; }
}

/* --------------------------- hero banner grid --------------------------- */
.hb-card {
  display: block;
  border-radius: var(--sf-radius);
  box-shadow: var(--sf-card-shadow);
}
.hb-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hb-card:hover .hb-img { transform: scale(1.04); }
.hb-img-mobile { display: none; }
@media (max-width: 640px) {
  .hb-img-desktop { display: none; }
  .hb-img-mobile { display: block; }
  .hb-img { aspect-ratio: 3 / 2; }
}
.hb-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.05) 85%, transparent);
  color: #fff;
}
.hb-title { font-size: 0.95rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
@media (min-width: 768px) { .hb-title { font-size: 1.15rem; } }
.hb-sub { margin-top: 0.2rem; font-size: 0.75rem; opacity: 0.88; }
.hb-btn {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  background: #fff;
  color: var(--brand-secondary, #0f172a);
  padding: 0.35rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 800;
}

/* --------------------------- category circles --------------------------- */
.cat-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
}
@media (min-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(var(--cat-cols, 4), minmax(0, 1fr)); }
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--sf-radius);
  border: 1px solid var(--sf-line);
  background: #fff;
  padding: 0.9rem 0.5rem 1rem;
  text-align: center;
  box-shadow: var(--sf-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.cat-card:hover {
  box-shadow: var(--sf-card-shadow-hover);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand, #16a34a) 30%, transparent);
}
.cat-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 68px;
  height: 68px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--brand, #16a34a) 10%, #fff);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.cat-card:hover .cat-thumb img { transform: scale(1.07); }
.cat-thumb-fallback { color: var(--brand, #16a34a); }
.cat-name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-secondary, #0f172a);
}
.cat-count { font-size: 0.68rem; color: #94a3b8; }
@media (min-width: 640px) {
  .cat-thumb { width: 92px; height: 92px; }
  .cat-name { font-size: 0.9rem; }
}

/* ======================= single product page ============================ */
.pdp-wrap { padding-bottom: 1rem; }

.pdp-grid { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) {
  .pdp-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
}

/* ------------------------------- gallery -------------------------------- */
.pdp-gallery { display: grid; gap: 0.75rem; }
@media (min-width: 768px) {
  .pdp-gallery { grid-template-columns: 78px minmax(0, 1fr); align-items: start; }
  .pdp-gallery.is-single { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1024px) { .pdp-gallery { position: sticky; top: 5.25rem; } }

.pdp-main-figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--sf-radius);
  border: 1px solid var(--sf-line);
  background: #fff;
  box-shadow: var(--sf-card-shadow);
  cursor: zoom-in;
  order: -1;
}
@media (min-width: 768px) { .pdp-main-figure { order: 0; } }
.pdp-main-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.35s ease;
  transform-origin: center center;
}
.pdp-main-figure.is-zoomed .pdp-main-img.is-current { transform: scale(2); transition: transform 0.1s linear; }

/* carousel track: one slide per view, swipe/click driven */
.pdp-track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
  touch-action: pan-y;
}
.pdp-slide { flex: 0 0 100%; min-width: 100%; }

.pdp-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  transform: translateY(-50%);
  border-radius: 9999px;
  border: 1px solid var(--sf-line);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}
.pdp-nav:hover { background: #fff; }
.pdp-nav-prev { left: 0.6rem; }
.pdp-nav-next { right: 0.6rem; }
@media (min-width: 768px) { .pdp-nav { width: 2.5rem; height: 2.5rem; } }

.pdp-dots {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  z-index: 3;
  display: flex;
  gap: 0.35rem;
  transform: translateX(-50%);
}
.pdp-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.pdp-dot.is-active { width: 18px; background: var(--brand, #16a34a); }

.pdp-badge {
  position: absolute;
  z-index: 2;
  top: 0.85rem;
  border-radius: 9999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
}
.pdp-badge-sale { right: 0.85rem; background: #e11d48; }
.pdp-badge-tag  { left: 0.85rem; background: var(--brand, #16a34a); }

.pdp-zoom-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.28rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
}

.pdp-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .pdp-thumbs {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 520px;
    padding-right: 0.15rem;
  }
}
.pdp-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 10px;
  border: 1.5px solid var(--sf-line-strong);
  background: #fff;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 768px) { .pdp-thumb { width: 78px; height: 78px; } }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb:hover { border-color: color-mix(in srgb, var(--brand, #16a34a) 55%, transparent); }
.pdp-thumb.is-active {
  border-color: var(--brand, #16a34a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #16a34a) 15%, transparent);
}

/* lightbox */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.9);
  padding: 1.25rem;
}
.pdp-lightbox.is-open { display: flex; }
.pdp-lightbox img {
  max-width: min(96vw, 900px);
  max-height: 88vh;
  border-radius: 12px;
  object-fit: contain;
}
.pdp-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ------------------------------- summary -------------------------------- */
.pdp-summary { display: grid; gap: 0.6rem; }

.pdp-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--sf-muted);
}
.pdp-eyebrow a:hover { color: var(--brand, #16a34a); }

.pdp-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--brand-secondary, #0f172a);
}
@media (min-width: 640px) { .pdp-title { font-size: 1.5rem; } }

.pdp-rating { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--sf-muted); }
.pdp-stars { color: #f59e0b; letter-spacing: 0.06em; }

.pdp-price-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  border-radius: var(--sf-radius);
  border: 1px solid color-mix(in srgb, var(--brand, #16a34a) 22%, transparent);
  background: color-mix(in srgb, var(--brand, #16a34a) 6%, #fff);
  padding: 0.4rem 0.6rem;
}
.pdp-price { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--brand, #16a34a); }
@media (min-width: 640px) { .pdp-price { font-size: 1.5rem; } }
.pdp-old { font-size: 0.85rem; color: #94a3b8; text-decoration: line-through; }
.pdp-save {
  border-radius: 9999px;
  background: #e11d48;
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
}

.pdp-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
}
.pdp-stock::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 9999px; background: currentColor; }
.pdp-stock-in   { background: rgba(16, 185, 129, 0.12); color: #047857; }
.pdp-stock-low  { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.pdp-stock-out  { background: rgba(244, 63, 94, 0.12);  color: #be123c; }

.pdp-short { font-size: 0.85rem; line-height: 1.4; color: #475569; }

.pdp-variations { margin-top: 0.3rem; margin-bottom: 0.3rem; }

.pdp-qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.3rem; }
.pdp-qty {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border-radius: 9999px;
  border: 1px solid var(--sf-line-strong);
  background: #fff;
}
.pdp-qty button {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-secondary, #0f172a);
  transition: background-color 0.15s ease;
}
.pdp-qty button:hover:not(:disabled) { background: rgba(15, 23, 42, 0.05); }
.pdp-qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.pdp-qty-val { min-width: 2.2rem; text-align: center; font-weight: 800; color: var(--brand-secondary, #0f172a); }

.pdp-actions { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
@media (min-width: 480px) { .pdp-actions { grid-template-columns: 1fr 1fr; } }
.pdp-actions > * { border-radius: 9999px !important; font-weight: 800 !important; }

.pdp-trust {
  display: grid;
  gap: 0.65rem;
  border-radius: var(--sf-radius);
  border: 1px dashed var(--sf-line-strong);
  background: rgba(248, 250, 252, 0.7);
  padding: 0.95rem 1.05rem;
  font-size: 0.8rem;
  color: #475569;
}
@media (min-width: 640px) { .pdp-trust { grid-template-columns: 1fr 1fr; } }
.pdp-trust span { display: flex; align-items: center; gap: 0.5rem; }
.pdp-trust svg { color: var(--brand, #16a34a); flex: 0 0 auto; }

/* ------------------------------- tabs ----------------------------------- */
.pdp-tabs-wrap {
  border-radius: var(--sf-radius);
  border: 1px solid var(--sf-line);
  background: #fff;
  box-shadow: var(--sf-card-shadow);
  overflow: hidden;
}
.pdp-tabs {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--sf-line);
  background: rgba(248, 250, 252, 0.8);
  padding: 0 0.35rem;
  scrollbar-width: none;
}
.pdp-tabs::-webkit-scrollbar { display: none; }
.pdp-tab {
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sf-muted);
  cursor: pointer;
  white-space: nowrap;
}
.pdp-tab.is-active { border-color: var(--brand, #16a34a); color: var(--brand, #16a34a); }
.pdp-panel { padding: 1.1rem 1.15rem 1.4rem; }
.pdp-panel[hidden] { display: none; }
.pdp-prose { font-size: 0.9rem; line-height: 1.9; color: #475569; }
.pdp-spec { width: 100%; font-size: 0.875rem; }
.pdp-spec div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--sf-line); }
.pdp-spec div:last-child { border-bottom: 0; }
.pdp-spec dt { color: var(--sf-muted); }
.pdp-spec dd { font-weight: 600; color: #334155; text-align: right; }

.pdp-review-card {
  border-radius: 12px;
  border: 1px solid var(--sf-line);
  background: #fff;
  padding: 1rem;
  box-shadow: var(--sf-card-shadow);
}

/* ------------------------ simple review form ----------------------------- */
.pdp-review-form {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--sf-line);
  background: #fff;
  padding: 1.1rem;
  box-shadow: var(--sf-card-shadow);
}
.pdp-review-form h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sf-heading, #0f172a);
}

/* Star picker: rendered 5 -> 1 so the CSS sibling trick can light up stars. */
.pdp-star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.15rem;
  font-size: 1.75rem;
  line-height: 1;
}
.pdp-star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pdp-star-input label {
  cursor: pointer;
  color: #e2e8f0;
  transition: color 0.15s ease, transform 0.15s ease;
}
.pdp-star-input label:hover,
.pdp-star-input label:hover ~ label,
.pdp-star-input input:checked ~ label { color: #fbbf24; }
.pdp-star-input label:hover { transform: scale(1.08); }
.pdp-star-input input:focus-visible + label { outline: 2px solid var(--brand, #0ea5e9); outline-offset: 2px; }

/* ----------------------- sold badge on cards ----------------------------- */
.pc-meta { min-height: 1.15rem; }
.sold-badge { white-space: nowrap; }

/* --------------------------- sticky buy bar ------------------------------ */
.pdp-buybar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-top: 1px solid var(--sf-line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, 0.55);
}
.pdp-buybar-price { font-weight: 800; color: var(--brand, #16a34a); }
.pdp-buybar .pdp-buybar-actions { display: flex; gap: 0.4rem; }
.pdp-buybar .pdp-buybar-actions > * { border-radius: 9999px !important; font-weight: 800 !important; }
@media (min-width: 1024px) { .pdp-buybar { display: none; } }
@media (max-width: 1023px) { body.has-buybar { padding-bottom: 4.75rem; } }

/* ---------------------------------------------------------------------------
 * "Online Full Payment" 5% OFF badge
 *
 * ONE discount system only: shown on every NON-COD gateway and in the order
 * summary. Percentage text is rendered server-side from
 * Admin -> Settings -> Payments -> Online payment discount.
 * ------------------------------------------------------------------------- */
.offer-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-left: auto;
  padding: .16rem .5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: linear-gradient(135deg, #059669 0%, #10b981 45%, #34d399 100%);
  color: #fff;
  font-size: .625rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(6, 95, 70, .25), 0 0 12px -2px rgba(16, 185, 129, .55);
  animation: offer-badge-glow 3s ease-in-out infinite;
}

/* Subtle sheen that sweeps across the badge. */
.offer-badge::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  animation: offer-badge-sheen 3.6s ease-in-out infinite;
}

.offer-badge-bolt { font-size: .68em; line-height: 1; }

.offer-badge-sm {
  margin-left: .35rem;
  padding: .08rem .4rem;
  font-size: .5625rem;
}

@keyframes offer-badge-glow {
  0%, 100% { box-shadow: 0 1px 2px rgba(6, 95, 70, .25), 0 0 10px -3px rgba(16, 185, 129, .45); }
  50%      { box-shadow: 0 1px 2px rgba(6, 95, 70, .25), 0 0 16px 0 rgba(16, 185, 129, .7); }
}

@keyframes offer-badge-sheen {
  0%       { left: -60%; }
  55%, 100% { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
  .offer-badge { animation: none; }
  .offer-badge::after { display: none; }
}

/* ---------------------------------------------------------------------------
 * bKash cashback badge (checkout payment methods + order summary)
 * Small, professional red badge with a subtle pulse/glow. Percentage text is
 * rendered server-side from Admin → Settings → Payments → bKash cashback.
 * ------------------------------------------------------------------------- */
.cashback-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
  padding: .15rem .45rem;
  border-radius: 9999px;
  border: 1px solid #fecdd3;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, .45);
  animation: cashback-pulse 2s ease-in-out infinite;
}

.cashback-badge-sm {
  margin-left: .35rem;
  padding: .05rem .35rem;
  font-size: .5625rem;
}

@keyframes cashback-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); transform: scale(1); }
  50%      { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0); transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .cashback-badge { animation: none; }
}

/* --------------------------------------------------------------------------
 * Review carousel (image only) — Admin > Reviews
 * ------------------------------------------------------------------------ */
.review-carousel { position: relative; }
.rc-track {
  display: flex;
  /* flex-start: each slide keeps its own image height, so no card is stretched
     and no image is cropped or distorted. */
  align-items: flex-start;
  gap: 1rem;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rc-track::-webkit-scrollbar { display: none; }

.rc-slide {
  flex: 0 0 82%;
  scroll-snap-align: start;
}
@media (min-width: 640px) { .rc-slide { flex-basis: 46%; } }
@media (min-width: 1024px) { .rc-slide { flex-basis: 31%; } }

.rc-card {
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}
.rc-img {
  display: block;
  width: 100%;
  height: auto;
  /* contain keeps every uploaded screenshot in its own aspect ratio: no
     stretching or cropping whatever size the admin uploads. */
  object-fit: contain;
  background: #f1f5f9;
}

.rc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.rc-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  transition: background-color 0.18s ease, opacity 0.18s ease;
}
.rc-arrow:hover:not(:disabled) { background: rgba(15, 23, 42, 0.05); }
.rc-arrow:disabled { opacity: 0.4; cursor: default; }

.rc-dots { display: inline-flex; align-items: center; gap: 0.4rem; }
.rc-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.rc-dot.is-active { width: 1.4rem; background: var(--brand, #e2506a); }

/* Rich product description rendering (bold, headings, lists, links) */
.pdp-prose { overflow-wrap: anywhere; }
.pdp-prose > *:first-child { margin-top: 0; }
.pdp-prose p { margin: 0 0 0.85rem; }
.pdp-prose strong, .pdp-prose b { font-weight: 700; color: #1e293b; }
.pdp-prose em, .pdp-prose i { font-style: italic; }
.pdp-prose u { text-decoration: underline; }
.pdp-prose h1, .pdp-prose h2, .pdp-prose h3, .pdp-prose h4, .pdp-prose h5, .pdp-prose h6 {
  color: #0f172a; font-weight: 700; line-height: 1.4; margin: 1.2rem 0 0.6rem;
}
.pdp-prose h1 { font-size: 1.5rem; }
.pdp-prose h2 { font-size: 1.28rem; }
.pdp-prose h3 { font-size: 1.1rem; }
.pdp-prose h4 { font-size: 1rem; }
.pdp-prose h5, .pdp-prose h6 { font-size: 0.95rem; }
.pdp-prose ul { list-style: disc; padding-left: 1.4rem; margin: 0 0 0.9rem; }
.pdp-prose ol { list-style: decimal; padding-left: 1.5rem; margin: 0 0 0.9rem; }
.pdp-prose li { margin: 0.25rem 0; }
.pdp-prose a { color: var(--brand, #16a34a); text-decoration: underline; word-break: break-word; }
.pdp-prose a:hover { opacity: 0.85; }
.pdp-prose blockquote { margin: 0 0 0.9rem; padding: 0.5rem 0.9rem; border-left: 3px solid var(--sf-line, #e2e8f0); color: #64748b; }
.pdp-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.pdp-prose table { width: 100%; border-collapse: collapse; margin: 0 0 0.9rem; display: block; overflow-x: auto; }
.pdp-prose th, .pdp-prose td { border: 1px solid var(--sf-line, #e2e8f0); padding: 0.5rem 0.65rem; text-align: left; }
.pdp-prose hr { border: 0; border-top: 1px solid var(--sf-line, #e2e8f0); margin: 1rem 0; }
@media (max-width: 640px) {
  .pdp-prose h1 { font-size: 1.3rem; }
  .pdp-prose h2 { font-size: 1.15rem; }
  .pdp-prose h3 { font-size: 1.03rem; }
}

/* ---------- product variations (colour / size) ---------- */
.pdp-variations { display: grid; gap: 1rem; margin: 1rem 0 1.25rem; }
.pdp-var-group { display: grid; gap: 0.5rem; }
.pdp-var-label { font-size: 0.8rem; font-weight: 700; color: #0f172a; letter-spacing: .01em; }
.pdp-var-selected { font-weight: 500; color: #64748b; margin-left: .25rem; }
.pdp-swatches, .pdp-sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pdp-swatch {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .6rem .3rem .3rem; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #fff; font-size: .8rem; font-weight: 600; color: #334155;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, opacity .15s;
}
.pdp-swatch img { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; }
.pdp-swatch:hover, .pdp-size:hover { border-color: #94a3b8; }
.pdp-size {
  min-width: 2.75rem; padding: .45rem .75rem; border: 1px solid #e2e8f0; border-radius: .5rem;
  background: #fff; font-size: .8rem; font-weight: 700; color: #334155; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, opacity .15s;
}
.pdp-swatch.is-active, .pdp-size.is-active {
  border-color: #0f172a; box-shadow: 0 0 0 2px rgba(15, 23, 42, .12);
}
.pdp-swatch.is-out, .pdp-size.is-out {
  opacity: .4; text-decoration: line-through;
}
.pdp-var-note { font-size: .75rem; color: #64748b; min-height: 1rem; }
.pdp-var-note.is-error { color: #e11d48; font-weight: 600; }
.cart-item-variation, .co-line-variation, .cd-variation { font-size: .72rem; color: #64748b; margin-top: .1rem; }
button[data-add-to-cart][disabled] { opacity: .55; cursor: not-allowed; }
