/* ─── Product detail page (PDP) ─── */

.pdp-page {
  background: var(--gray-100, #f4f6fb);
  padding-bottom: 2.5rem;
}

/* Hero / wayfinding strip — clean white (marketplace-style) */
.pdp-hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--gray-200, #e2e8f0);
}

.pdp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, rgba(10, 36, 114, 0.05), transparent 55%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(230, 57, 70, 0.04), transparent 55%);
  pointer-events: none;
}

.pdp-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 1.35rem) 1rem;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px);
  gap: 1rem 1.5rem;
  align-items: center;
}

.pdp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
  list-style: none;
  padding: 0;
}

.pdp-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pdp-breadcrumb a {
  color: var(--commerce-navy, #0A2472);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.pdp-breadcrumb a:hover {
  color: var(--commerce-coral, #E63946);
  text-decoration: underline;
}

.pdp-breadcrumb__sep {
  color: var(--gray-300, #cbd5e1);
  font-size: 0.65rem;
  user-select: none;
}

.pdp-breadcrumb__current {
  color: var(--gray-500, #64748b);
  font-weight: 600;
  max-width: min(100%, 28ch);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdp-help-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--gray-50, #f8fafc);
  border: 1px solid var(--gray-200, #e2e8f0);
  box-shadow: 0 8px 24px rgba(10, 36, 114, 0.06);
}

.pdp-help-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.pdp-help-card strong {
  display: block;
  color: var(--gray-800, #1e293b);
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.pdp-help-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gray-500, #64748b);
  line-height: 1.45;
}

.pdp-help-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--commerce-navy, #0A2472), #12358a);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pdp-help-card__btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 36, 114, 0.25);
}

/* Main layout — moderate gallery, wider buy panel */
.pdp-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 1.75rem) 1rem 0;
}

.pdp-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start;
}

/* Gallery */
.pdp-gallery {
  position: sticky;
  top: 120px;
  width: 100%;
  max-width: 380px;
  justify-self: start;
  background: #fff;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 20px;
  padding: 0.85rem 1rem 1rem;
  box-shadow: 0 12px 40px rgba(10, 36, 114, 0.06);
}

.pdp-gallery__stage {
  position: relative;
  width: 100%;
  max-height: 340px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f8fafc 0%, #eef2ff 100%);
  border-radius: 14px;
  overflow: hidden;
}

.pdp-gallery__stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 300px;
  object-fit: contain;
  padding: 0.5rem;
  transition: transform 0.35s ease;
}

.pdp-gallery:hover .pdp-gallery__stage img {
  transform: scale(1.02);
}

.pdp-gallery__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pdp-gallery__badge--sale {
  background: var(--commerce-coral, #E63946);
  color: #fff;
}

.pdp-gallery__badge--featured {
  background: var(--commerce-navy, #0A2472);
  color: #fff;
}

.pdp-gallery__badge--oos {
  background: #64748b;
  color: #fff;
}

.pdp-thumbs {
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pdp-thumb {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 2px solid var(--gray-200, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pdp-thumb:hover {
  border-color: var(--commerce-navy, #0A2472);
}

.pdp-thumb.is-active {
  border-color: var(--commerce-coral, #E63946);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

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

.pdp-image-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--gray-400, #94a3b8);
  text-align: center;
  padding: 2rem;
}

.pdp-image-fallback i {
  font-size: 2.5rem;
  opacity: 0.5;
}

/* Buy panel */
.pdp-panel {
  background: #fff;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 20px;
  padding: clamp(1.15rem, 2.5vw, 1.65rem);
  box-shadow: 0 12px 40px rgba(10, 36, 114, 0.05);
  min-width: 0;
}

.pdp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.pdp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--gray-100, #f1f5f9);
  color: var(--gray-600, #475569);
  border: 1px solid var(--gray-200, #e2e8f0);
}

.pdp-pill--sale {
  background: #fef2f2;
  color: var(--commerce-coral, #E63946);
  border-color: #fecaca;
}

.pdp-pill--stock {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.pdp-pill--stock.is-low {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.pdp-pill--stock.is-out {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.pdp-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  color: var(--gray-800, #1e293b);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.pdp-hook {
  font-size: 0.95rem;
  color: var(--gray-500, #64748b);
  line-height: 1.55;
  margin: 0 0 1rem;
}

.pdp-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--gray-600, #475569);
}

.pdp-stars {
  display: inline-flex;
  gap: 0.1rem;
  color: #f59e0b;
  font-size: 0.85rem;
}

.pdp-rating a {
  color: var(--commerce-navy, #0A2472);
  font-weight: 600;
  text-decoration: none;
}

.pdp-rating a:hover {
  text-decoration: underline;
}

.pdp-price-block {
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-top: 1px solid var(--gray-200, #e2e8f0);
  border-bottom: 1px solid var(--gray-200, #e2e8f0);
}

.pdp-price {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--commerce-coral, #E63946);
  line-height: 1;
  letter-spacing: -0.02em;
}

.pdp-price-was {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--gray-400, #94a3b8);
  text-decoration: line-through;
  font-weight: 600;
}

.pdp-price-save {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.45rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
}

.pdp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.pdp-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: var(--gray-50, #f8fafc);
  border: 1px solid var(--gray-200, #e2e8f0);
  font-size: 0.78rem;
  color: var(--gray-700, #334155);
}

.pdp-meta-chip i {
  color: var(--commerce-navy, #0A2472);
  opacity: 0.85;
}

.pdp-meta-chip strong {
  font-weight: 700;
  color: var(--gray-800, #1e293b);
}

.pdp-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.pdp-qty {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--gray-200, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.pdp-qty button {
  width: 42px;
  height: 46px;
  border: none;
  background: var(--gray-50, #f8fafc);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-700, #334155);
  cursor: pointer;
  transition: background 0.15s;
}

.pdp-qty button:hover {
  background: var(--gray-100, #f1f5f9);
}

.pdp-qty input {
  width: 52px;
  height: 46px;
  border: none;
  border-left: 1px solid var(--gray-200, #e2e8f0);
  border-right: 1px solid var(--gray-200, #e2e8f0);
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800, #1e293b);
  font-family: inherit;
}

.pdp-qty input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--commerce-navy, #0A2472);
}

.pdp-cta-primary {
  flex: 1;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--commerce-coral, #E63946), var(--commerce-coral-dark, #c72535));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.pdp-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(230, 57, 70, 0.42);
}

.pdp-cta-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pdp-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  border: 2px solid var(--gray-200, #e2e8f0);
  background: #fff;
  color: var(--commerce-navy, #0A2472);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.pdp-cta-secondary:hover {
  border-color: var(--commerce-navy, #0A2472);
  background: var(--gray-50, #f8fafc);
  color: var(--commerce-navy, #0A2472);
}

.pdp-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.pdp-trust-item {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid var(--gray-200, #e2e8f0);
  font-size: 0.72rem;
  line-height: 1.4;
}

.pdp-trust-item i {
  display: block;
  color: var(--commerce-navy, #0A2472);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.pdp-trust-item strong {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-800, #1e293b);
  margin-bottom: 0.1rem;
}

.pdp-trust-item span {
  color: var(--gray-500, #64748b);
}

.pdp-oos {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--commerce-coral-dark, #c72535);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.pdp-wa-inline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  margin-bottom: 1.15rem;
}

.pdp-wa-inline i {
  font-size: 1.4rem;
  color: #25d366;
}

.pdp-wa-inline p {
  margin: 0;
  flex: 1;
  font-size: 0.82rem;
  color: var(--gray-600, #475569);
  line-height: 1.45;
}

.pdp-wa-inline a {
  font-size: 0.78rem;
  font-weight: 800;
  color: #15803d;
  text-decoration: none;
  white-space: nowrap;
}

.pdp-wa-inline a:hover {
  text-decoration: underline;
}

.pdp-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200, #e2e8f0);
}

.pdp-section h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-800, #1e293b);
  margin: 0 0 0.65rem;
}

.pdp-description {
  font-size: 0.92rem;
  color: var(--gray-600, #475569);
  line-height: 1.75;
}

.pdp-description p {
  margin: 0 0 0.75rem;
}

.pdp-description p:last-child {
  margin-bottom: 0;
}

/* Reviews */
.pdp-reviews {
  max-width: var(--max-width, 1200px);
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.pdp-reviews__head {
  margin-bottom: 1rem;
}

.pdp-reviews__head h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: var(--gray-800, #1e293b);
}

.pdp-reviews__head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--gray-500, #64748b);
}

.pdp-review-list {
  display: grid;
  gap: 0.75rem;
}

.pdp-review-card {
  background: #fff;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 14px;
  padding: 1rem 1.15rem;
}

.pdp-review-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pdp-review-card__name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gray-800, #1e293b);
}

.pdp-review-card__date {
  font-size: 0.75rem;
  color: var(--gray-400, #94a3b8);
}

.pdp-review-card__body {
  font-size: 0.88rem;
  color: var(--gray-600, #475569);
  line-height: 1.55;
  margin: 0;
}

.pdp-related {
  max-width: var(--max-width, 1200px);
  margin: 2.5rem auto 0;
  padding: 0 1rem;
}

.pdp-related__head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.pdp-related__head h2 {
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.pdp-related__head h2 span:first-child {
  color: var(--commerce-navy, #0A2472);
}

.pdp-related__head h2 span:last-child {
  color: var(--commerce-coral, #E63946);
}

.pdp-related__head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--gray-500, #64748b);
}

.pdp-related .product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 1025px) {
  .pdp-layout {
    grid-template-columns: 360px minmax(520px, 1fr);
    gap: 2rem;
  }

  .pdp-gallery {
    max-width: 360px;
  }

  .pdp-gallery__stage {
    max-height: 320px;
  }

  .pdp-gallery__stage img {
    max-height: 280px;
  }
}

@media (max-width: 1024px) {
  .pdp-layout {
    grid-template-columns: 1fr;
  }

  .pdp-gallery {
    position: static;
    max-width: 420px;
    margin: 0 auto;
  }

  .pdp-panel {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }

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

@media (max-width: 768px) {
  .pdp-hero__inner {
    grid-template-columns: 1fr;
  }

  .pdp-help-card {
    grid-template-columns: auto 1fr;
  }

  .pdp-help-card__btn {
    grid-column: 1 / -1;
    justify-content: center;
  }

  /* Keep the quantity stepper and Add-to-cart side by side; the
     "Continue shopping" link spans full width below them. */
  .pdp-buy-row { align-items: stretch; }
  .pdp-cta-secondary { width: 100%; }

  /* Room for the sticky buy bar so it never hides the last content */
  .pdp-page { padding-bottom: 5.5rem; }
}

@media (max-width: 480px) {
  .pdp-related .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Sticky mobile buy bar (commercial-grade) ─── */
.pdp-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--gray-200, #e2e8f0);
  box-shadow: 0 -8px 24px rgba(10, 36, 114, 0.1);
  transform: translateY(110%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-sticky-bar.is-visible {
  transform: translateY(0);
}

.pdp-sticky-bar__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.pdp-sticky-bar__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600, #475569);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp-sticky-bar__price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--commerce-coral, #E63946);
  line-height: 1.1;
}

.pdp-sticky-bar__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.35rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--commerce-coral, #E63946), var(--commerce-coral-dark, #c72535));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.35);
  transition: transform 0.15s;
}

.pdp-sticky-bar__cta:active { transform: scale(0.97); }

/* Only ever shows on phones; lift the WhatsApp FAB above it when active */
@media (max-width: 768px) {
  .pdp-sticky-bar { display: flex; }

  body.pdp-sticky-active .ax-wa-float {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
}

/* ════════════════════════════════════════════════════════════
   Mobile hardening — kill horizontal overflow & wrap long text
   ════════════════════════════════════════════════════════════ */

/* Long titles / URLs / unbroken words must never push the page wide */
.pdp-title,
.pdp-hook,
.pdp-description,
.pdp-description * ,
.pdp-review-card__name,
.pdp-review-card__body,
.pdp-help-card strong,
.pdp-help-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Let flex/grid text columns shrink instead of overflowing */
.pdp-help-card > div,
.pdp-review-card__top,
.pdp-review-card__top > div { min-width: 0; }

/* Safety net: clip stray horizontal overflow on phones
   (gallery is static here and the buy bar is position:fixed, so nothing
   that needs to stick/overflow is affected). */
@media (max-width: 768px) {
  .pdp-page { overflow-x: clip; }
}

/* Tighten everything for small phones */
@media (max-width: 480px) {
  .pdp-main,
  .pdp-hero__inner,
  .pdp-reviews,
  .pdp-related { padding-left: 0.85rem; padding-right: 0.85rem; }

  .pdp-gallery { max-width: 100%; padding: 0.65rem 0.7rem 0.8rem; }
  .pdp-gallery__stage { max-height: 280px; }
  .pdp-thumb { width: 48px; height: 48px; }

  .pdp-panel { padding: 1rem; border-radius: 16px; }

  .pdp-qty button { width: 40px; height: 46px; }
  .pdp-qty input { width: 46px; height: 46px; }
  .pdp-cta-primary { min-width: 0; flex: 1 1 150px; padding: 0.8rem 1rem; }

  .pdp-help-card { padding: 0.75rem; }
  .pdp-help-card__icon { width: 38px; height: 38px; font-size: 1.2rem; }

  .pdp-sticky-bar { gap: 0.6rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .pdp-sticky-bar__cta { padding: 0.75rem 1rem; font-size: 0.85rem; }
}
