/* Safencia reusable product page system */
:root {
  --product-accent: #0b5be7;
  --product-accent-dark: #0738be;
  --product-accent-soft: #eef7ff;
  --product-sale: #f59e0b;
  --product-sale-soft: #fff8e7;
  --product-page-bg: #f7fbff;
  --product-card-shadow: 0 10px 30px rgba(15, 35, 64, 0.08);
}

body.product-template {
  background: var(--product-page-bg);
}

.product-template .site-header {
  background: rgba(255, 255, 255, 0.94);
}

.sf-product-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px clamp(14px, 4vw, 32px) 96px;
}

.sf-breadcrumb {
  padding: 10px 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.sf-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-weight: 700;
}

.sf-breadcrumb li + li::before {
  content: ">";
  margin-right: 8px;
  color: #cbd5e1;
}

.sf-breadcrumb a {
  color: #334155;
}

.sf-product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}

.sf-gallery,
.sf-buybox,
.sf-section,
.sf-mobile-bar {
  background: #fff;
  border: 1px solid #e4edf7;
  box-shadow: var(--product-card-shadow);
}

.sf-gallery {
  position: sticky;
  top: 104px;
  border-radius: 8px;
  overflow: hidden;
}

.sf-main-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #fff, #f7fbff);
  overflow: hidden;
}

.sf-main-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(14px, 3vw, 28px);
  transition: transform 180ms ease;
}

@media (hover: hover) {
  .sf-main-media:hover img {
    transform: scale(1.08);
  }
}

.sf-discount-badge,
.sf-stock-badge {
  position: absolute;
  top: 14px;
  z-index: 2;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  font-size: 0.78rem;
}

.sf-discount-badge {
  left: 14px;
  background: var(--product-accent);
  color: #fff;
}

.sf-stock-badge {
  right: 14px;
  background: var(--product-accent-soft);
  color: var(--product-accent-dark);
  border: 1px solid #dbeafe;
}

.sf-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #e7edf6;
}

.sf-thumb {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.sf-thumb.is-active {
  border-color: var(--product-accent);
}

.sf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-buybox {
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
}

.sf-kicker {
  margin: 0 0 8px;
  color: var(--product-accent);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sf-buybox h1 {
  margin: 0;
  font-size: clamp(1.62rem, 4.7vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: #111827;
}

.sf-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  color: #334155;
  font-weight: 800;
  font-size: 0.9rem;
}

.sf-stars {
  color: var(--product-sale);
  letter-spacing: 1px;
  white-space: nowrap;
}

.sf-price-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
}

.sf-current-price {
  display: inline-block;
  font-size: clamp(1.8rem, 5vw, 2.45rem);
  line-height: 1;
  font-weight: 900;
  color: #111827;
}

.sf-old-price {
  margin-left: 10px;
  color: #94a3b8;
  font-weight: 800;
  text-decoration: line-through;
}

.sf-save-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--product-sale-soft);
  color: #a16207;
  font-size: 0.78rem;
  font-weight: 900;
}

.sf-price-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.sf-trust-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.sf-trust-item {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 82px;
  padding: 10px 6px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  text-align: center;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 850;
}

.sf-trust-item svg {
  width: 22px;
  height: 22px;
  color: var(--product-accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-benefit-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.sf-benefit-list li {
  position: relative;
  padding-left: 26px;
  color: #1f2937;
  font-size: 0.96rem;
  line-height: 1.48;
}

.sf-benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--product-accent);
  box-shadow: inset 0 0 0 5px #fff, 0 0 0 1px var(--product-accent);
}

.sf-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.sf-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 900;
  text-align: center;
}

.sf-cta svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-cta-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

.sf-cta-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

.sf-cta-secondary {
  background: linear-gradient(135deg, #0738be, #075be8);
  color: #fff;
}

.sf-cta-whatsapp {
  grid-column: 1 / -1;
  background: #fff;
  border-color: #bfdbfe;
  color: var(--product-accent-dark);
}

.sf-delivery-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 15px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dbeafe;
}

.sf-delivery-box div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #334155;
  font-size: 0.88rem;
}

.sf-delivery-box strong {
  color: #111827;
}

.sf-product-content {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.sf-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 4px;
  scrollbar-width: none;
}

.sf-tabs::-webkit-scrollbar {
  display: none;
}

.sf-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #fff;
  color: #334155;
  font-weight: 900;
  font-size: 0.86rem;
}

.sf-tab.is-active {
  color: #fff;
  background: var(--product-accent);
  border-color: var(--product-accent);
}

.sf-section {
  display: none;
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
}

.sf-section.is-active {
  display: block;
}

.sf-section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.18;
}

.sf-section h3 {
  margin: 22px 0 10px;
  font-size: 1.05rem;
}

.sf-section p {
  max-width: 78ch;
  color: #334155;
  line-height: 1.75;
}

.sf-icon-grid,
.sf-related-grid,
.sf-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sf-info-card,
.sf-review-card,
.sf-related-card {
  border: 1px solid #e4edf7;
  border-radius: 8px;
  background: #fff;
  padding: 15px;
}

.sf-info-card strong,
.sf-review-card strong,
.sf-related-card strong {
  display: block;
  color: #111827;
  line-height: 1.3;
}

.sf-info-card p,
.sf-review-card p,
.sf-related-card p {
  margin: 7px 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.sf-spec-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e4edf7;
}

.sf-spec-table th,
.sf-spec-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e4edf7;
  text-align: left;
  vertical-align: top;
}

.sf-spec-table th {
  width: 34%;
  background: #f8fbff;
  color: #111827;
  font-weight: 900;
}

.sf-box-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sf-box-list li {
  padding: 12px 14px;
  border: 1px solid #e4edf7;
  border-radius: 8px;
  background: #f8fbff;
  font-weight: 800;
}

.sf-faq-list {
  display: grid;
  gap: 10px;
}

.sf-faq-list details {
  border: 1px solid #e4edf7;
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.sf-faq-list summary {
  cursor: pointer;
  padding: 15px 16px;
  font-weight: 900;
  color: #111827;
}

.sf-faq-list p {
  margin: 0;
  padding: 0 16px 16px;
}

.sf-review-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) 1fr;
  gap: 18px;
  margin-bottom: 16px;
}

.sf-score-card {
  border-radius: 8px;
  padding: 18px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  color: #1f2937;
}

.sf-score-card strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  color: #111827;
}

.sf-score-card span {
  display: block;
  margin-top: 8px;
  color: #f5a623;
  font-weight: 900;
}

.sf-score-card p {
  margin: 8px 0 0;
  color: #475569;
  font-weight: 700;
}

.sf-bars {
  display: grid;
  gap: 8px;
}

.sf-bar {
  display: grid;
  grid-template-columns: 54px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
  color: #475569;
  font-weight: 800;
}

.sf-bar span:nth-child(2) {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.sf-bar span:nth-child(2)::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--fill);
  background: var(--product-sale);
}

.sf-related-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.sf-related-card__image {
  display: block;
  min-width: 0;
}

.sf-related-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: #f8fbff;
}

.sf-related-card a {
  color: #111827;
  font-weight: 900;
}

.sf-related-card p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sf-related-card span {
  display: block;
  margin-top: 5px;
  color: var(--product-accent);
  font-weight: 900;
}

.sf-related-showcase {
  margin-top: 22px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background:
    radial-gradient(circle at 4% 12%, rgba(250, 204, 21, 0.16), transparent 17rem),
    linear-gradient(135deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: var(--product-card-shadow);
  overflow: hidden;
}

.sf-related-showcase__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.sf-related-showcase__head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.95rem);
  line-height: 1.15;
  color: #111827;
}

.sf-related-showcase__head > a {
  flex: 0 0 auto;
  color: var(--product-accent);
  font-weight: 900;
}

.sf-related-showcase__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
  min-width: 0;
}

.sf-related-card--showcase {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  min-width: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.sf-related-card--showcase:hover,
.sf-related-card--showcase:focus-within {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.sf-related-card--showcase .sf-related-card__image {
  background: #f8fbff;
}

.sf-related-card--showcase img {
  width: 100%;
  height: 164px;
  object-fit: contain;
  border-radius: 0;
  padding: 10px;
}

.sf-related-card--showcase > div {
  display: grid;
  align-content: start;
  padding: 13px;
  min-height: 170px;
}

.sf-related-card--showcase > div > a {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  max-width: 100%;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sf-related-add {
  align-self: end;
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-weight: 900;
}

.sf-related-add:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

.sf-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-width: 1px 0 0;
}

.sf-mobile-price {
  display: grid;
  align-content: center;
  font-weight: 900;
}

.sf-mobile-price span {
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  .sf-product-hero {
    grid-template-columns: 1fr;
  }

  .sf-gallery {
    position: static;
  }
}

@media (max-width: 720px) {
  .sf-product-shell {
    padding-inline: 12px;
  }

  .sf-buybox {
    padding: 16px;
  }

  .sf-trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sf-cta-grid,
  .sf-review-summary,
  .sf-icon-grid,
  .sf-related-grid,
  .sf-review-grid {
    grid-template-columns: 1fr;
  }

  .sf-related-showcase__head {
    align-items: start;
    flex-direction: column;
  }

  .sf-related-showcase__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sf-thumbs {
    grid-template-columns: repeat(5, 64px);
    overflow-x: auto;
  }

  .sf-section {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  .sf-tabs {
    display: none;
  }

  .sf-section h2 {
    position: relative;
    margin: 0;
    padding: 17px 44px 17px 16px;
    border-bottom: 1px solid #e4edf7;
    cursor: pointer;
    font-size: 1rem;
  }

  .sf-section h2::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.35rem;
  }

  .sf-section.is-active h2::after {
    content: "-";
  }

  .sf-section-body {
    display: none;
    padding: 16px;
  }

  .sf-section.is-active .sf-section-body {
    display: block;
  }

  .sf-box-list {
    grid-template-columns: 1fr;
  }

  .sf-spec-table th,
  .sf-spec-table td {
    display: block;
    width: 100%;
  }

  .sf-mobile-bar {
    display: grid;
  }
}

@media (max-width: 640px) {
  .sf-related-showcase__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .sf-buybox h1 {
    font-size: 1.46rem;
  }

  .sf-trust-item {
    min-height: 74px;
  }

  .sf-related-showcase {
    padding: 14px;
  }

  .sf-related-card--showcase img {
    height: 190px;
  }
}

/* ── Variant selector (size + colour) ─────────────────────────────── */
.sf-variant-block {
  display: grid;
  gap: 14px;
  margin: 18px 0 6px;
}
.sf-variant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.sf-variant-head {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2a44;
  min-width: 92px;
}
.sf-variant-head strong {
  color: var(--product-accent-dark);
}
.sf-chip-row,
.sf-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sf-chip {
  border: 1.5px solid #dbe6f3;
  background: #fff;
  color: #1f2a44;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.sf-chip:hover {
  border-color: var(--product-accent);
}
.sf-chip.is-active {
  border-color: var(--product-accent);
  background: var(--product-accent-soft);
  color: var(--product-accent-dark);
  box-shadow: inset 0 0 0 1px var(--product-accent);
}
.sf-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: var(--sw, #ccc);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #dbe6f3;
  transition: box-shadow 0.15s, transform 0.15s;
  position: relative;
}
.sf-swatch:hover {
  box-shadow: 0 0 0 1.5px var(--product-accent);
}
.sf-swatch.is-active {
  box-shadow: 0 0 0 2px var(--product-accent), 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: scale(1.08);
}
.sf-swatch.is-active::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ── Bundle / bulk-pricing tiers ──────────────────────────────────── */
.sf-bundle-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0 6px;
}
@media (min-width: 560px) {
  .sf-bundle-block {
    grid-template-columns: repeat(4, 1fr);
  }
}
.sf-bundle {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  border: 1.5px solid #dbe6f3;
  background: #fff;
  border-radius: 14px;
  padding: 15px 8px 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.sf-bundle:hover {
  border-color: var(--product-accent);
}
.sf-bundle.is-active {
  border-color: var(--product-accent);
  background: var(--product-accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--product-accent);
}
.sf-bundle--popular {
  border-color: var(--product-sale);
}
.sf-bundle--popular.is-active {
  box-shadow: inset 0 0 0 1.5px var(--product-sale);
}
.sf-bundle__qty {
  font-weight: 800;
  font-size: 1rem;
  color: #1f2a44;
}
.sf-bundle__tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--product-sale);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.sf-bundle__unit {
  font-size: 0.74rem;
  color: var(--muted);
}
.sf-bundle__total {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--product-accent-dark);
  margin-top: 2px;
}
.sf-bundle__total s {
  display: block;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--muted);
}
.sf-bundle__badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--product-sale);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
