/* ============================================================
   assets/css/detail-new.css — v6.0 Redesign Mobile-First
   Prudels Wardrobe — Product Detail Page
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,600&family=Inter:wght@300;400;500;600;700;800&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --clr-bg:        #F5F5F3;
  --clr-surface:   #FFFFFF;
  --clr-dark:      #111111;
  --clr-dark-2:    #222222;
  --clr-muted:     #888888;
  --clr-muted-2:   #BBBBBB;
  --clr-accent:    #C8102E;
  --clr-accent-bg: #FFF0F2;
  --clr-green:     #1DB954;
  --clr-sep:       rgba(0,0,0,0.07);
  --clr-wa:        #25D366;
  --radius-xs:     6px;
  --radius-sm:     10px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --shadow-sm:     0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:     0 8px 32px rgba(0,0,0,0.1);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.14);
  --trans-fast:    0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-med:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Bottom padding: sticky bar ~48px + buffer */
  --pb-mobile:     80px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  font-family: 'Inter', sans-serif;
  color: var(--clr-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--pb-mobile);
}

/* ================================================================
   GALLERY — Full-bleed portrait carousel (Mobile)
   ================================================================ */
.pdp-gallery {
  position: relative;
  width: 100%;
  background: #E8E6E1;
  overflow: hidden;
  /* 4:5 portrait — lebih modern dari 3:4 di mobile */
  aspect-ratio: 4 / 5;
}

.pdp-gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pdp-gallery-track::-webkit-scrollbar { display: none; }

.pdp-gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 100%;
  overflow: hidden;
}

.pdp-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Bottom vignette overlay */
.pdp-gallery-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 100%);
  pointer-events: none;
}

/* Dot indicators */
.pdp-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  pointer-events: none;
  z-index: 5;
}

.pdp-dot {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.4);
  transition: width 0.28s ease, background 0.28s ease;
}

.pdp-dot.active {
  width: 20px;
  background: #fff;
}

/* Badge counter + SKU — top left */
.pdp-gallery-badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.pdp-gallery-counter {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.4px;
}

/* Share button — top right */
.pdp-btn-share {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  z-index: 5;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--trans-fast);
}

.pdp-btn-share:hover { background: rgba(255,255,255,0.32); }

/* Thumbnail strip — hidden on mobile, shown on desktop */
.pdp-thumbs { display: none; }

/* ================================================================
   PRODUCT INFO — Right column (mobile: stacked below gallery)
   ================================================================ */
.pdp-body {
  padding: 20px 16px 0;
}

/* Category breadcrumb */
.pdp-category {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

/* Product title */
.pdp-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--clr-dark);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

/* Price row */
.pdp-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pdp-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--clr-dark);
  letter-spacing: -1.5px;
  line-height: 1;
}

.pdp-price-coret {
  font-size: 0.82rem;
  color: var(--clr-muted-2);
  text-decoration: line-through;
  font-weight: 400;
}

.pdp-price-disc {
  background: var(--clr-accent-bg);
  color: var(--clr-accent);
  font-size: 0.64rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Meta chips */
.pdp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.pdp-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.67rem;
  color: var(--clr-muted);
  font-weight: 500;
  background: rgba(0,0,0,0.04);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--clr-sep);
}

.pdp-meta-chip i { font-size: 0.7rem; }

/* Tags */
.pdp-tags {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.pdp-tags::-webkit-scrollbar { display: none; }

.pdp-tag {
  flex-shrink: 0;
  color: var(--clr-muted);
  font-size: 0.64rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
  border: 1px solid rgba(0,0,0,0.09);
  letter-spacing: 0.2px;
  transition: background var(--trans-fast), color var(--trans-fast);
}

.pdp-tag:hover {
  background: var(--clr-dark);
  color: #fff;
  border-color: transparent;
}

/* ================================================================
   DIVIDER
   ================================================================ */
.pdp-sep {
  height: 1px;
  background: var(--clr-sep);
  margin: 16px 16px;
}

/* ================================================================
   VARIANT SELECTOR
   ================================================================ */
.pdp-variants { padding: 0 16px; }

.pdp-variant-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--clr-dark);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.pdp-variant-label span {
  font-weight: 400;
  color: var(--clr-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
  font-size: 0.78rem;
}

/* Color swatches */
.pdp-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.pdp-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  outline: 1.5px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform var(--trans-fast), outline-color var(--trans-fast);
  position: relative;
}

.pdp-swatch:hover { transform: scale(1.1); }

.pdp-swatch.active {
  outline-color: var(--clr-dark);
  outline-width: 2px;
  transform: scale(1.12);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--clr-dark);
}

/* Size buttons */
.pdp-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pdp-size {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(0,0,0,0.12);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-dark-2);
  background: var(--clr-surface);
  cursor: pointer;
  transition: all var(--trans-fast);
  min-width: 44px;
  text-align: center;
  line-height: 1;
}

.pdp-size:hover {
  border-color: var(--clr-dark);
  background: #f0f0f0;
}

.pdp-size.active {
  background: var(--clr-dark);
  color: #fff;
  border-color: var(--clr-dark);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

/* Stock notice */
.pdp-stock-notice {
  font-size: 0.73rem;
  font-weight: 600;
  margin-top: 10px;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: rgba(0,0,0,0.03);
}

/* No-stock message */
.pdp-out-of-stock {
  font-size: 0.8rem;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}

/* ================================================================
   STICKY BOTTOM BAR — Mobile fixed, desktop static
   ================================================================ */
.pdp-sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 10px 14px 12px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  animation: slideUpBar 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pdp-sticky-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pdp-sticky-cart-col {
  flex: 1;
}

.pdp-sticky-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--clr-muted-2);
  font-weight: 700;
  line-height: 1;
}

@keyframes slideUpBar {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.pdp-btn-cart {
  width: 100%;
  height: 44px;
  background: var(--clr-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--trans-fast), transform var(--trans-fast), box-shadow var(--trans-fast);
  position: relative;
  overflow: hidden;
}

.pdp-btn-cart::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.pdp-btn-cart:not(:disabled):hover {
  background: #1a1a1a;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  transform: translateY(-1px);
}

.pdp-btn-cart:not(:disabled):active {
  transform: translateY(0);
  box-shadow: none;
}

.pdp-btn-cart:disabled {
  background: #E0E0E0;
  color: #AAAAAA;
  cursor: not-allowed;
}

.pdp-sticky-mp {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pdp-sticky-mp .pdp-mp-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  opacity: 1;
  transition: transform var(--trans-fast), opacity var(--trans-fast), box-shadow var(--trans-fast);
}

.pdp-sticky-mp .pdp-mp-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pdp-sticky-mp .pdp-mp-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

/* ================================================================
   DESCRIPTION ACCORDION
   ================================================================ */
.pdp-desc { padding: 0 16px; }

.pdp-desc-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  border-top: 1px solid var(--clr-sep);
  border-bottom: 1px solid var(--clr-sep);
  padding: 14px 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clr-dark);
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color var(--trans-fast);
}

.pdp-desc-toggle:hover { color: var(--clr-accent); }

.pdp-desc-toggle i {
  color: var(--clr-muted);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  font-size: 0.82rem;
}

.pdp-desc-toggle i.open { transform: rotate(180deg); }

.pdp-desc-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s ease;
}

.pdp-desc-body.open { max-height: 5000px; }

.pdp-desc-inner {
  padding: 16px 0 20px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #5a5a5a;
}

/* Markdown output */
.md-p {
  font-size: 0.82rem;
  line-height: 1.8;
  color: #5a5a5a;
  margin-bottom: 0.55rem;
}

.md-h3, .md-h4, .md-h5 {
  font-weight: 700;
  color: var(--clr-dark);
  margin: 0.9rem 0 0.35rem;
}

.md-h3 { font-size: 0.98rem; }
.md-h4 { font-size: 0.9rem; }
.md-h5 { font-size: 0.84rem; }

.md-ul {
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

.md-ul li {
  font-size: 0.82rem;
  line-height: 1.8;
  color: #5a5a5a;
  margin-bottom: 3px;
}

.md-hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 1rem 0;
}

/* ================================================================
   RECOMMENDATIONS SECTION
   ================================================================ */
.pdp-recs-wrap {
  margin-top: 8px;
}

.pdp-recs {
  padding: 24px 16px 32px;
}

.pdp-recs-title {
  font-size: 0.57rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: var(--clr-muted);
  margin-bottom: 14px;
}

/* Product grid — 2 columns on mobile */
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Product Card */
.product-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--clr-dark);
  display: block;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans-med), box-shadow var(--trans-med);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card-img-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.product-card-img-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s ease;
  display: block;
}

.product-card:hover .product-card-img-wrapper img {
  transform: scale(1.04);
}

.product-card-body { padding: 10px 11px 12px; }

.product-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-dark);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.38;
}

.price-container {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.product-price {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--clr-dark);
}

.product-price-striked {
  font-size: 0.66rem;
  color: var(--clr-muted-2);
  text-decoration: line-through;
}

/* ================================================================
   DESKTOP ≥ 768px — Two-column layout
   ================================================================ */
@media (min-width: 768px) {
  :root { --pb-mobile: 0px; }

  body {
    padding-bottom: 0;
    background: var(--clr-bg);
  }

  /* Two-column grid */
  .pdp-wrap {
    max-width: 1160px;
    margin: 40px auto 56px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 52px;
    align-items: start;
  }

  /* Sticky left column */
  .pdp-left {
    position: sticky;
    top: 96px;
  }

  /* Gallery — rounded on desktop */
  .pdp-gallery {
    border-radius: var(--radius-lg);
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow-lg);
  }

  /* Thumbnail strip — desktop only */
  .pdp-thumbs {
    display: flex;
    gap: 7px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pdp-thumbs::-webkit-scrollbar { display: none; }

  .pdp-thumb {
    flex-shrink: 0;
    width: 54px; height: 72px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
    transition: opacity var(--trans-fast), border-color var(--trans-fast), transform var(--trans-fast);
  }

  .pdp-thumb:hover {
    opacity: 0.7;
    transform: translateY(-1px);
  }

  .pdp-thumb.active {
    opacity: 1;
    border-color: var(--clr-dark);
  }

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

  /* Right column */
  .pdp-right { padding-top: 8px; }
  .pdp-body { padding: 0; }

  .pdp-title {
    font-size: 1.65rem;
    letter-spacing: -0.5px;
  }

  .pdp-price { font-size: 2rem; }

  .pdp-sep { margin: 20px 0; }

  .pdp-variants,
  .pdp-market,
  .pdp-desc { padding: 0; }

  /* Sticky bar → static inline on desktop */
  .pdp-sticky-bar {
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    padding: 0;
    margin-top: 4px;
    margin-bottom: 24px;
    animation: none;
  }

  .pdp-btn-cart {
    height: 52px;
    font-size: 1.25rem;
    border-radius: var(--radius-md);
  }

  .pdp-sticky-mp .pdp-mp-btn {
    width: 52px;
    height: 52px;
  }

  /* Recommendations — full width below */
  .pdp-recs-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px 64px;
  }

  .pdp-recs {
    padding: 0;
    background: transparent;
    margin-top: 0;
  }

  .pdp-recs-title {
    font-size: 0.57rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
  }

  .pdp-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .product-card { border-radius: var(--radius-md); }

  .product-card-img-wrapper { aspect-ratio: 3 / 4; }
}

/* ================================================================
   LARGE DESKTOP ≥ 1280px
   ================================================================ */
@media (min-width: 1280px) {
  .pdp-wrap {
    max-width: 1280px;
    gap: 72px;
  }

  .pdp-recs-wrap { max-width: 1280px; }

  .pdp-title { font-size: 1.85rem; }

  .pdp-price { font-size: 2.2rem; }
}

/* ================================================================
   PREMIUM MINI TOAST & GUIDED VARIANT ALERT
   ================================================================ */
.pdp-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  border-radius: 30px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: none;
  white-space: nowrap;
}

.pdp-toast-warning i {
  color: #f59e0b;
}

.pdp-toast-success i {
  color: #10b981;
}

@keyframes toastSlideIn {
  from { transform: translate(-50%, -40px); opacity: 0; }
  to   { transform: translate(-50%, 0);    opacity: 1; }
}

.pdp-toast.fade-out {
  animation: toastFadeOut 0.4s ease forwards;
}

@keyframes toastFadeOut {
  from { transform: translate(-50%, 0); opacity: 1; }
  to   { transform: translate(-50%, -20px); opacity: 0; }
}

/* Variant selection alert highlight (Pulse & Shake) */
.pdp-variants-alert {
  animation: variantShake 0.6s ease;
  outline: 2px dashed #f59e0b !important;
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

@keyframes variantShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-6px); }
  30%, 60%, 90% { transform: translateX(6px); }
}