/* ============================
   PRODUCT DETAILS (Mobile-first)
   File: public/css/product-show.css
   ============================ */

:root{
  --pd-text:#0f172a;
  --pd-muted:rgba(15,23,42,.65);
  --pd-border:rgba(0,0,0,.08);
  --pd-soft:rgba(0,0,0,.05);
  --pd-bg:#ffffff;
  --pd-card:#ffffff;
  --pd-pill:#f8fafc;
  --pd-primary:#0f172a;
  --pd-green:#1ba672;
}

/* ✅ FIX 1: fonts match home (do NOT make bold here) */
.pd-wrap, .pd-wrap *{
  font-family: "Poppins","Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing: normal;
}

/* page wrapper */
.pd-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 14px 24px; /* ✅ FIX 2: no sticky => no extra bottom padding */
}

/* top breadcrumb */
.pd-bc{
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 12.5px;
  color: var(--pd-muted);
  margin: 6px 0 12px;
  overflow:hidden;
}
.pd-bc a{
  color: var(--pd-muted);
  text-decoration:none;
  white-space:nowrap;
}
.pd-bc a:hover{ text-decoration: underline; }
.pd-bc .sep{ opacity:.55; }
.pd-bc .cur{
  color: var(--pd-text);
  font-weight: 600; /* ✅ match home feel */
  white-space:nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

/* main grid */
.pd-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* media card */
.pd-media{
  background: var(--pd-card);
  border:1px solid var(--pd-border);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 10px 28px rgba(16,24,40,.06);
}

/* media carousel area */
.pd-media-main{
  position:relative;
  background:#f6f7f9;
}

/* single image view */
.pd-media-main img{
  width:100%;
  display:block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* thumbnails */
.pd-thumbs{
  display:flex;
  gap:10px;
  padding: 12px;
  overflow:auto;
  border-top: 1px solid var(--pd-border);
  background:#fff;
  scrollbar-width: none;
}
.pd-thumbs::-webkit-scrollbar{ display:none; }

.pd-thumb{
  width:64px;
  height:64px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background:#f6f7f9;
  cursor:pointer;
}
.pd-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.pd-thumb.is-active{
  outline: 2px solid rgba(15,23,42,.55);
  outline-offset: 2px;
}

/* right info card */
.pd-info{
  background: var(--pd-card);
  border:1px solid var(--pd-border);
  border-radius: 18px;
  padding: 14px 14px 16px;
  box-shadow: 0 10px 28px rgba(16,24,40,.06);
}

.pd-title{
  font-size: 18px;
  font-weight: 700; /* ✅ not extra bold */
  color: var(--pd-text);
  line-height: 1.25;
  margin: 2px 0 6px;
}

.pd-sub{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pd-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--pd-pill);
  border: 1px solid var(--pd-border);
  font-size: 12px;
  color: var(--pd-muted);
  font-weight: 500;
}

/* pricing */
.pd-price-row{
  display:flex;
  align-items: baseline;
  gap:10px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
}
.pd-price{
  font-size: 20px;
  font-weight: 700; /* ✅ not 900 */
  color: var(--pd-text);
}
.pd-mrp{
  font-size: 14px;
  color: rgba(15,23,42,.55);
  text-decoration: line-through;
}
.pd-off{
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--pd-primary);
  padding: 5px 9px;
  border-radius: 999px;
}

/* variant selector */
.pd-variants{
  margin-top: 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.pd-label{
  font-size: 12px;
  font-weight: 600;
  color: rgba(15,23,42,.75);
}
.pd-variant-row{
  display:flex;
  gap:10px;
  overflow:auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.pd-variant-row::-webkit-scrollbar{ display:none; }

.pd-variant{
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  min-width: 120px;
}
.pd-variant .v1{
  font-weight: 700;
  color: var(--pd-text);
  font-size: 13px;
}
.pd-variant .v2{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(15,23,42,.65);
  font-weight: 500;
}
.pd-variant.is-active{
  border-color: rgba(27,166,114,.65);
  box-shadow: 0 0 0 3px rgba(27,166,114,.12);
}

/* desktop add block inside card */
.pd-actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content: flex-start;
}

.pd-actions .qty-box{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  min-height: 40px;
}

.pd-actions .btn-add-cart{
  background: var(--pd-green);
  color:#fff;
  border:none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700; /* ✅ */
  font-size: 13px;
  cursor:pointer;
  line-height: 1;
}

.pd-actions .qty-controls{
  display:inline-flex;
  align-items:center;
  gap: 12px;
  background: var(--pd-green);
  color:#fff;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
}
.pd-actions .qty-controls .qty{
  font-weight: 700;
  min-width: 18px;
  text-align:center;
}
.pd-actions .qty-btn{
  background:none;
  border:none;
  color:#fff;
  font-size: 18px;
  font-weight: 800;
  cursor:pointer;
  line-height: 1;
  padding: 0 4px;
}

/* info sections */
.pd-sections{
  margin-top: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.pd-sec{
  border: 1px solid var(--pd-border);
  background:#fff;
  border-radius: 16px;
  overflow:hidden;
}
.pd-sec summary{
  list-style:none;
  cursor:pointer;
  padding: 12px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  color: var(--pd-text);
}
.pd-sec summary::-webkit-details-marker{ display:none; }
.pd-sec summary .hint{
  font-size: 12px;
  font-weight: 600;
  color: rgba(15,23,42,.55);
}
.pd-sec .pd-sec-body{
  padding: 0 12px 12px;
  color: rgba(15,23,42,.82);
  font-size: 13.5px;
  line-height: 1.55;
}
.pd-sec .pd-sec-body p{ margin: 8px 0 0; }

/* ✅ FIX 2: completely remove bottom sticky from mobile + all */
.pd-sticky{ display:none !important; }

/* floating go-to-cart (keep for desktop only if you want) */
.pd-float-cart{
  position: fixed;
  right: 14px;
  bottom: 24px;
  z-index: 1300;
  display:none;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--pd-primary);
  box-shadow: 0 18px 44px rgba(0,0,0,.20);
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.pd-float-cart svg{
  width: 22px;
  height: 22px;
  stroke:#fff;
  stroke-width:2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.pd-float-cart.is-show{
  display:flex;
  animation: pdBlink 1.3s ease-in-out infinite;
}

@keyframes pdBlink{
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-3px); opacity: .75; }
}

/* ✅ If you want NO floating cart on mobile too */
@media (max-width: 899px){
  .pd-float-cart{ display:none !important; }
}

/* desktop layout */
@media (min-width: 900px){
  .pd-wrap{ padding: 18px 16px 26px; }
  .pd-grid{
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
    align-items:start;
  }
  .pd-title{ font-size: 22px; }
  .pd-price{ font-size: 24px; }
}

/* small screens */
@media (max-width: 380px){
  .pd-thumb{ width:58px; height:58px; }
  .pd-variant{ min-width: 110px; }
}
