/* ===========================================================================
 * 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;
}

/* ------------------------------- footer -------------------------------- */
.site-footer {
  color: var(--brand-footer-text, rgba(255, 255, 255, 0.8));
  overflow-x: clip;
}
.site-footer-grid { align-items: start; }
.site-footer-brand,
.site-footer-section,
.site-footer-links,
.site-footer-links li,
.site-footer-links a { min-width: 0; }
.site-footer-copy,
.site-footer-muted,
.site-footer-links a,
.site-footer-copyright,
.site-footer-badges { overflow-wrap: anywhere; }
.site-footer .site-footer-heading {
  color: var(--brand-footer-heading, #fff);
  font-weight: 700;
  line-height: 1.35;
}
.site-footer .site-footer-muted { color: var(--brand-footer-muted, rgba(255, 255, 255, 0.7)); }
.site-footer-links a {
  display: inline-flex;
  line-height: 1.45;
  color: var(--brand-footer-text, rgba(255, 255, 255, 0.8));
  text-decoration-color: transparent;
  text-underline-offset: 0.22rem;
  transition: color 0.18s ease, text-decoration-color 0.18s ease, transform 0.18s ease;
}
.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  color: var(--brand-footer-heading, #fff);
  text-decoration: underline;
  text-decoration-color: currentColor;
  transform: translateX(2px);
}
.site-footer-socials a {
  color: var(--brand-footer-text, rgba(255, 255, 255, 0.8));
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}
.site-footer-socials a:hover,
.site-footer-socials a:focus-visible { color: var(--brand-footer-heading, #fff); }
.site-footer-badges svg,
.site-footer-socials svg { flex: 0 0 auto; }
.site-footer-payment-gateway,
.site-footer-copyright { border-color: color-mix(in srgb, var(--brand-footer-text, #fff) 14%, transparent); }
@media (max-width: 767px) {
  .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer-brand { grid-column: 1 / -1; }
  .site-footer-section { padding-top: 0.25rem; }
}
@media (max-width: 420px) {
  .site-footer-grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer-brand { grid-column: auto; }
}

/* --------------------------- section rhythm ----------------------------- */
.s-block { scroll-margin-top: 5rem; }
/* Category strip -> Trending Products: keep a small, balanced gap. */
.home-categories.s-block { padding-bottom: 0.5rem; }
#bestsellers.s-block { padding-top: 0.5rem; }
@media (min-width: 640px) {
  .home-categories.s-block { padding-bottom: 1rem; }
  #bestsellers.s-block { padding-top: 0.75rem; }
}

.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 carousel --------------------------- */
.cat-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.cat-track {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.15rem 0.125rem 0.3rem;
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border-radius: 1rem;
  border: 1px solid var(--sf-line);
  background: transparent;
  padding: 0.4rem 0.35rem 0.45rem;
  text-align: center;
  box-shadow: var(--sf-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  width: calc((100% - (0.6rem * 2)) / 3.25);
}
.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-card::before,
.cat-card::after,
.cat-thumb::before,
.cat-thumb::after {
  content: none;
  display: none;
}
/* Uniform rounded-square image tile. Images use object-fit: contain so they
   are never stretched, squeezed, or cropped — every illustration stays whole,
   centered, and fills the same consistent shape. */
/* Transparent thumb blends seamlessly with the section background — no white
   box behind the image. The rounded shape + soft shadow live on .cat-card. */
.cat-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 68px;
  height: 64px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  background: transparent;
  /* White baked into the image file blends into the light card behind it,
     so only the artwork stays visible — no white box, no re-export needed. */
  mix-blend-mode: multiply;
  transition: transform 0.35s ease;
}
.cat-card:hover .cat-thumb img { transform: scale(1.06); }
.cat-thumb-fallback { color: var(--brand, #16a34a); }
/* A compact reserved meta area keeps names and optional counts aligned. */
.cat-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  min-height: 2rem;
}
.cat-name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-secondary, #0f172a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-count { font-size: 0.64rem; line-height: 1; color: #94a3b8; }
@media (min-width: 390px) {
  .cat-card { width: calc((100% - (0.6rem * 3)) / 3.6); }
}
@media (min-width: 480px) {
  .cat-card { width: calc((100% - (0.6rem * 3)) / 3.8); }
}
@media (min-width: 640px) {
  .cat-track { gap: 1rem; }
  .cat-card { width: calc((100% - (1rem * 4)) / 4.5); padding: 0.5rem 0.45rem; }
  .cat-thumb { width: 88px; height: 82px; }
  .cat-name { font-size: 0.88rem; }
  .cat-meta { min-height: 2.2rem; }
}
@media (min-width: 768px) {
  .cat-card { width: calc((100% - (1rem * 5)) / 5.25); }
}
@media (min-width: 1024px) {
  .cat-card { width: calc((100% - (1rem * 6)) / 6.5); }
}
@media (min-width: 1280px) {
  .cat-card { width: calc((100% - (1rem * 7)) / 7.5); }
}

/* --------------------------- compact section heading --------------------------- */
.section-heading-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.section-heading-compact__main {
  grid-column: 2;
  min-width: 0;
  text-align: center;
}
.section-heading-compact__sub {
  margin: 0 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand, #16a34a);
}
.section-heading-compact__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--brand-secondary, #0f172a);
}
.section-heading-compact__link {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand, #16a34a);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.section-heading-compact__link:hover {
  color: color-mix(in srgb, var(--brand, #16a34a) 80%, #000);
}
@media (min-width: 640px) {
  .section-heading-compact { margin-bottom: 2rem; }
  .section-heading-compact__title { font-size: 1.5rem; }
  .section-heading-compact__link { font-size: 0.875rem; }
}

/* ======================= single product page ============================ */
.pdp-wrap {
  width: 100%;
  max-width: 1280px;
  padding-bottom: 1.5rem;
  overflow: clip;
}

.pdp-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  overflow: hidden;
  color: var(--sf-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.pdp-breadcrumb a { flex: 0 0 auto; transition: color 0.18s ease; }
.pdp-breadcrumb a:hover { color: var(--brand); }
.pdp-breadcrumb > span:last-child { min-width: 0; overflow: hidden; color: var(--brand-secondary); text-overflow: ellipsis; }
.pdp-breadcrumb svg { flex: 0 0 auto; opacity: 0.55; }

.pdp-grid { display: grid; min-width: 0; gap: 1.25rem; }
@media (min-width: 1024px) {
  .pdp-grid { grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
}

/* The thumbnail rail remains left of the main image at every viewport. */
.pdp-gallery {
  display: grid;
  min-width: 0;
  grid-template-columns: clamp(3.25rem, 16vw, 4.5rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(0.5rem, 2vw, 0.9rem);
}
.pdp-gallery.is-single { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .pdp-gallery { grid-template-columns: 5.25rem minmax(0, 1fr); }
}
@media (min-width: 1024px) {
  .pdp-gallery { position: sticky; top: 5.25rem; grid-template-columns: 5.5rem minmax(0, 1fr); }
}


.pdp-main-figure {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid var(--sf-line);
  background: #fff;
  box-shadow: var(--sf-card-shadow);
  cursor: zoom-in;
  grid-column: 2;
  grid-row: 1;
}
.pdp-gallery.is-single .pdp-main-figure { grid-column: 1; }
.pdp-main-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  /* contain: product shots keep their full framing, never cropped/distorted */
  object-fit: contain;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center center;
}
.pdp-main-figure.is-zoomed .pdp-main-img.is-current { transform: scale(2); transition: transform 0.1s linear; }

.pdp-wishlist {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 4;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--sf-line);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-secondary);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  transition: color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}
.pdp-wishlist:hover { color: var(--brand); transform: translateY(-1px); }
.pdp-wishlist.is-active { background: var(--brand); color: var(--brand-button-text, #fff); }
.pdp-wishlist.is-active svg { fill: currentColor; }
.pdp-wishlist:disabled { cursor: wait; opacity: 0.65; }

/* 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.5rem;
  height: 2.5rem;
  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.65rem;
  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.65rem;
  top: 0.65rem;
  bottom: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--sf-line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-secondary);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  pointer-events: none;
}

.pdp-thumbs {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  max-height: min(78vw, 34rem);
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.55rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.1rem 0.2rem 0.1rem 0.1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y proximity;
}
.pdp-thumbs::-webkit-scrollbar { display: none; }

.pdp-thumb {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  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;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.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; min-width: 0; gap: 0.75rem; align-content: start; }

.pdp-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--sf-line);
  font-size: 0.82rem;
  color: var(--sf-muted);
}
.pdp-eyebrow a:hover { color: var(--brand, #16a34a); }

/* Brand box: compact bordered card with original-aspect logo */
.pdp-brand-box {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--sf-line-strong);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pdp-brand-box:hover {
  border-color: color-mix(in srgb, var(--brand, #16a34a) 40%, transparent);
  box-shadow: var(--sf-card-shadow);
}
.pdp-brand-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sf-muted);
  white-space: nowrap;
}
.pdp-brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.5rem;
  max-width: 5.5rem;
}
.pdp-brand-logo {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.pdp-brand-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-secondary, #0f172a);
}

.pdp-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--brand-secondary, #0f172a);
}
@media (min-width: 640px) { .pdp-title { font-size: 1.7rem; } }
@media (min-width: 1024px) { .pdp-title { font-size: 1.9rem; } }

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

/* price: selling price dominant, old price + % off beside it */
.pdp-price-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.7rem;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0.4rem 0 0.75rem;
  border-bottom: 1px dashed var(--sf-line, #e2e8f0);
}
.pdp-price {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--brand, #16a34a);
}
@media (min-width: 640px) { .pdp-price { font-size: 2.15rem; } }
.pdp-old { font-size: 1rem; font-weight: 600; color: #94a3b8; text-decoration: line-through; }
.pdp-save {
  align-self: center;
  border-radius: 6px;
  background: #e11d48;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}
.pdp-save-amt {
  align-self: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #047857;
  white-space: nowrap;
}

.pdp-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  font-size: 0.82rem;
  font-weight: 700;
}
.pdp-stock::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 9999px; background: currentColor; }
.pdp-stock-in   { color: #047857; }
.pdp-stock-low  { color: #b45309; }
.pdp-stock-out  { color: #be123c; }
/* Variable products before a variation is picked. */
.pdp-stock-hint { color: #64748b; font-weight: 600; }
.pdp-stock-hint::before { background: #cbd5e1; }

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

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

/* quantity: bigger, touch friendly stepper */
.pdp-qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.25rem; }
.pdp-qty {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--sf-line-strong);
  background: #fff;
}
.pdp-qty button {
  width: 2.85rem;
  height: 2.85rem;
  font-size: 1.15rem;
  font-weight: 800;
  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.75rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand-secondary, #0f172a);
}

/* Exactly four purchase actions in a stable 2 × 2 grid, including 320px. */
.pdp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.pdp-actions > * { min-width: 0; }
.pdp-actions form { display: flex; width: 100%; }
.pdp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
  min-height: 2.6rem;
  padding: 0 0.35rem;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: clamp(0.66rem, 2.9vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.pdp-cta:active { transform: translateY(1px); }
.pdp-cta:disabled { opacity: 0.55; cursor: not-allowed; }
.pdp-cta svg { flex: 0 0 auto; }
.pdp-cta-cart { background: var(--brand); color: var(--brand-button-text, #fff); box-shadow: 0 8px 20px -12px var(--brand); }
.pdp-cta-cart:hover:not(:disabled) { background: var(--brand-button-hover); }
.pdp-cta-order {
  background: var(--brand-secondary, #111827);
  color: #fff;
  box-shadow: 0 8px 20px -12px var(--brand-secondary, #111827);
}
.pdp-cta-order:hover:not(:disabled) { filter: brightness(0.95); }
.pdp-contact-wa { background: #22c55e; color: #fff; }
.pdp-contact-wa:hover { filter: brightness(0.94); }
.pdp-contact-call {
  background: #1d4ed8;
  color: #fff;
}
.pdp-contact-call:hover { filter: brightness(0.94); }



.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-top: 1px solid var(--sf-line);
  border-bottom: 1px solid var(--sf-line);
  background: transparent;
  overflow: hidden;
}
.pdp-tabs {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--sf-line);
  background: #fff;
  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; }

@media (max-width: 479.98px) {
  .pdp-wrap { padding-inline: 0.75rem; padding-top: 0.85rem; }
  .pdp-grid { gap: 1rem; }
  .pdp-title { font-size: 1.22rem; }
  .pdp-price { font-size: 1.65rem; }
  .pdp-nav { display: none; }
  .pdp-badge { top: 0.5rem; padding: 0.22rem 0.45rem; font-size: 0.62rem; }
  .pdp-badge-sale { right: 0.5rem; }
  .pdp-badge-tag { left: 0.5rem; }
  .pdp-zoom-hint { top: 0.45rem; right: 0.45rem; width: 2rem; height: 2rem; }
  .pdp-wishlist { top: 0.45rem; left: 0.45rem; width: 2rem; height: 2rem; }
  .pdp-actions { gap: 0.4rem; }
  .pdp-cta { min-height: 2.5rem; }
  .pdp-cta svg { width: 0.9rem; height: 0.9rem; }
  .pdp-tabs-wrap { margin-top: 1rem; }
}

@media (min-width: 1280px) {
  /* Same 1280px content width as the header, footer and homepage sections so
     the product page lines up with the rest of the site on large screens. */
  .pdp-wrap { padding-inline: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-track, .pdp-main-img, .pdp-cta, .pdp-wishlist { transition: none; }
}

/* The product page always exposes its compact cart shortcut and live count. */
.product-page .cart-fab.is-empty {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}
.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; }



/* ---------------------------------------------------------------------------
 * "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: 0.65rem; margin: 0.3rem 0; }
.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; }

/* ===========================================================================
 * Ghorer Bazar style header, dark category bar, carousel arrows and brands
 * ======================================================================== */
.gb-header { background: #fff; }
.gb-headbar {
  height: 4.25rem;
  gap: 0.75rem;
}
.gb-brand { flex: 0 0 auto; }
.gb-logo { max-width: 150px; }

.gb-search { flex: 0 1 26rem; max-width: 26rem; margin-left: auto; }
@media (min-width: 1024px) { .gb-search { flex-basis: 32rem; max-width: 32rem; } }
@media (max-width: 767px) { .gb-search { display: none; } }


.gb-actions { gap: 0.35rem; margin-left: auto; }
.gb-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 3.25rem;
  padding: 0.3rem 0.4rem;
  border-radius: 0.65rem;
  color: var(--brand-secondary, #0f172a);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.1;
  background: transparent;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.gb-action:hover { color: var(--brand, #f47b20); background: rgba(15, 23, 42, 0.04); }
.gb-action-icon { position: relative; display: inline-flex; }
.gb-action .hdr-cart-badge {
  position: absolute;
  top: -0.4rem;
  right: -0.55rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--brand, #f47b20);
  color: #fff;
  font-size: 0.63rem;
  font-weight: 800;
}
.gb-action .hdr-cart-badge.is-empty { display: none; }
@media (max-width: 767px) {
  .gb-headbar { height: 3.5rem; }
  .gb-action-desk, .gb-action-more { display: none; }
  .gb-action-label { display: none; }
  .gb-action { min-width: 2.5rem; }
}

/* ------------------------- dark category nav ---------------------------- */
.gb-catnav {
  background: var(--catnav-bg, #14261f);
  color: var(--catnav-text, #fff);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
@media (max-width: 767px) { .gb-catnav { display: none; } }
.gb-catnav-inner {
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  justify-content: center;
}
.gb-catnav-inner::-webkit-scrollbar { display: none; }
.gb-catnav-item { position: relative; }
.gb-catnav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--catnav-text, rgba(255, 255, 255, 0.92));
  transition: color 0.18s ease;
}
.gb-catnav-link:hover { color: var(--brand, #f47b20); }
/* Category Header Text Color (Admin > General Settings).
   The bar lives inside <header class="site-header">, so these rules are
   scoped through .gb-catnav to beat the generic header link colour.
   Icons and chevrons use stroke="currentColor", so they follow along. */
.gb-catnav,
.gb-catnav .gb-catnav-link,
.gb-catnav .gb-catnav-link:visited,
.gb-catnav .gb-catnav-item > a,
.gb-catnav .gb-catnav-link.is-active,
.gb-catnav .gb-catnav-item.is-active > .gb-catnav-link {
  color: var(--catnav-text, #fff);
}
.gb-catnav .gb-catnav-link svg,
.gb-catnav .gb-catnav-link i { color: inherit; stroke: currentColor; fill: none; }
.gb-catnav .gb-catnav-link:hover,
.gb-catnav .gb-catnav-link:focus-visible { color: var(--brand, #f47b20); }
.gb-catnav-drop {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 12rem;
  display: none;
  flex-direction: column;
  padding: 0.35rem;
  border-radius: 0.6rem;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.45);
  z-index: 60;
}
.gb-catnav-item.has-sub:hover .gb-catnav-drop { display: flex; }
.gb-catnav-drop a {
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1f2937;
}
.gb-catnav-drop a:hover { background: rgba(15, 23, 42, 0.05); color: var(--brand, #f47b20); }

/* ------------------------ category carousel arrows ---------------------- */
.cat-carousel { padding: 0; }
/* Desktop: the carousel shares the exact container width of the other
   homepage sections, so arrows sit inside instead of hanging over the edge. */
@media (min-width: 768px) {
  .cat-carousel { margin-left: 0; margin-right: 0; }
  .cat-track { padding-left: 0; padding-right: 0; }
  .cat-nav.prev { left: 0.25rem; }
  .cat-nav.next { right: 0.25rem; }
}
.cat-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid var(--sf-line);
  background: #fff;
  color: var(--brand, #f47b20);
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.45);
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.cat-nav:hover { background: var(--brand, #f47b20); color: #fff; }
.cat-nav[hidden] { display: none !important; }
.cat-nav.prev { left: -0.35rem; }
.cat-nav.next { right: -0.35rem; }
.cat-carousel.has-nav .cat-nav { display: inline-flex; }
@media (max-width: 639px) {
  .cat-carousel .cat-nav { width: 2rem; height: 2rem; }
}

/* ------------------------------- brands --------------------------------- */
.brand-carousel { position: relative; }
.brand-track {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0;
  padding: 0.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.brand-track::-webkit-scrollbar { display: none; }

.brand-slide {
  flex: 0 0 calc((100% - 0.65rem) / 2);
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .brand-track { gap: 1rem; }
  .brand-slide { flex-basis: calc((100% - (1rem * 2)) / 3); }
}
@media (min-width: 1024px) {
  .brand-slide { flex-basis: calc((100% - (1rem * 3)) / 4); }
}

.brand-item {
  display: grid;
  place-items: center;
  height: 4.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius);
  background: #fff;
  box-shadow: var(--sf-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.brand-item:hover { box-shadow: var(--sf-card-shadow-hover); transform: translateY(-2px); }
.brand-item img { max-height: 2.75rem; max-width: 100%; object-fit: contain; }
.brand-item span { font-size: 0.85rem; font-weight: 700; color: var(--brand-secondary, #0f172a); }

.brand-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}
.bc-dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  transition: width 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}
.bc-dot.is-active { width: 1.4rem; background: var(--brand, #e2506a); }

/* ------------------------ product carousel (sliders) -------------------- */
.product-carousel { position: relative; }
.product-track {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0;
  padding: 0.25rem 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.product-track::-webkit-scrollbar { display: none; }
.product-track > .pc-slide {
  flex: 0 0 calc((100% - 0.65rem) / 2);
  scroll-snap-align: start;
  display: flex;
}
.product-track > .pc-slide > * { width: 100%; }
@media (min-width: 640px) {
  .product-track { gap: 1rem; }
  .product-track > .pc-slide { flex-basis: calc((100% - (1rem * 2)) / 3); }
}
@media (min-width: 1024px) {
  .product-track { gap: 1.15rem; }
  .product-track > .pc-slide { flex-basis: calc((100% - (1.15rem * 3)) / 4); }
}
.product-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}
.pcx-dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  transition: width 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}
.pcx-dot.is-active { width: 1.4rem; background: var(--brand, #e2506a); }

/* --------------------------- product card tweaks ------------------------ */
.product-card .pc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; width: 100%; }
.product-card .pc-actions.no-buy { grid-template-columns: 1fr; }
.product-card .pc-actions > * { width: 100%; justify-content: center; }
.product-card .pc-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--brand, #f47b20);
  color: #fff;
  transition: filter 0.2s ease;
}
.product-card .pc-buy-btn:hover { filter: brightness(0.93); }
.product-card .pc-foot { flex-direction: column; align-items: stretch; gap: 0.5rem; }
.product-card .pc-actions form { display: contents; }


/* --------- mobile: product cards keep Add to cart only (Buy now is
   hidden on phones, still active on tablet/desktop) --------------------- */
@media (max-width: 767px) {
  .product-card .pc-buy-btn { display: none !important; }
}


/* ---------------------------------------------------------------------------
 * Uniform product cards (all listings: home, shop, category, related)
 * Style-only: reserves fixed space for name, meta, price and actions so a long
 * product name never makes one card taller than its neighbours.
 * ------------------------------------------------------------------------- */
.product-grid > * { height: 100%; }
.product-card { height: 100%; }
.product-card .pc-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-card .pc-desc { min-height: 2.5em; }
.product-card .pc-meta { min-height: 1.15rem; }
/* Price box hugs its content; row alignment comes from the stretched grid
   items plus `margin-top:auto` on the footer, so no dead space is reserved
   under the Add to cart button. */
.product-card .pc-pricebox { min-height: 0; }
.product-card .pc-foot { margin-top: auto; margin-bottom: 0; }
.product-card .pc-actions { margin-bottom: 0; }

/* Wider but slimmer Add to cart / Buy now on cards (not the PDP). */
.product-card .product-order-btn,
.product-card .pc-buy-btn {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  gap: 0.45rem;
  line-height: 1.1;
  border-width: 1px;
  border-radius: 9999px;
}
.product-card .product-order-btn svg,
.product-card .pc-buy-btn svg { flex: 0 0 auto; }
@media (min-width: 640px) {
  .product-card .product-order-btn,
  .product-card .pc-buy-btn { min-height: 2.45rem; font-size: 0.875rem; }
}
/* Phones show Add to cart only — let it use the full card width. */
@media (max-width: 767px) {
  .product-card .pc-actions { grid-template-columns: 1fr; }
}
/* Single out-of-stock status pill (replaces the old duplicate button + note). */
.product-card .pc-soldout {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
}


/* ------- shop / category filter bar: 3 equal columns on one row --------- */
.shop-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.shop-bar > * { width: 100%; min-width: 0; }
.shop-bar .shop-bar-btn { justify-content: center; padding: 0 0.6rem; }
.shop-bar .shop-bar-select select { width: 100%; max-width: 100%; }
@media (max-width: 480px) {
  .shop-bar { gap: 0.4rem; }
  .shop-bar .shop-bar-select select { max-width: 100%; padding: 0 1.6rem 0 0.6rem; font-size: 0.8rem; }
  .shop-bar .shop-bar-btn { font-size: 0.8rem; gap: 0.3rem; }
}

/* ------- mouse-drag affordance for the horizontal sliders (desktop) ------- */
@media (hover: hover) and (pointer: fine) {
  [data-pc-track], [data-bc-track], [data-rc-track] { cursor: grab; }
  [data-pc-track].is-dragging,
  [data-bc-track].is-dragging,
  [data-rc-track].is-dragging { cursor: grabbing; scroll-behavior: auto; }
  [data-pc-track].is-dragging a,
  [data-bc-track].is-dragging a,
  [data-rc-track].is-dragging img { pointer-events: none; }
}
