/* ============================================
   PDP — Product Detail Page
   ThreadVaultOS / True Identity
   ============================================ */

/* --- Body & scrollbar --- */
.pdp-body {
  overflow-x: hidden;
}

/* --- Nav --- */
.pdp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid rgba(26, 24, 20, 0.1);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.pdp-nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--fg);
  text-decoration: none;
}

.pdp-nav-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.pdp-nav-back:hover {
  color: var(--fg);
}

/* --- Main layout --- */
.pdp-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - 65px);
  align-items: start;
}

/* --- Gallery (left) --- */
.pdp-gallery {
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 2.5rem 2rem 3rem;
  overflow: hidden;
  background: var(--bg-warm);
}

.pdp-main-img-wrap {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  background: linear-gradient(155deg, #C4B48A 0%, #A8956E 40%, #8C7355 70%, #7A6040 100%);
}

.pdp-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pdp-main-img-wrap:hover .pdp-main-img {
  transform: scale(1.03);
}

.pdp-zoom-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(26, 24, 20, 0.55);
  color: rgba(245, 240, 232, 0.85);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.pdp-main-img-wrap:hover .pdp-zoom-hint {
  opacity: 1;
}

/* Thumbnails */
.pdp-thumbs {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.pdp-thumb {
  flex: 1;
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #C4B48A 0%, #9E8A65 100%);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  padding: 0;
}

.pdp-thumb:nth-child(2) {
  background: linear-gradient(135deg, #D8CDB2 0%, #BBA98A 100%);
}
.pdp-thumb:nth-child(3) {
  background: linear-gradient(135deg, #A8956E 0%, #8C7355 100%);
}
.pdp-thumb:nth-child(4) {
  background: linear-gradient(135deg, #3A3028 0%, #2C2218 100%);
}

.pdp-thumb:hover {
  border-color: rgba(200, 86, 30, 0.4);
  transform: translateY(-2px);
}

.pdp-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(200, 86, 30, 0.25);
}

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

.pdp-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7);
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  padding: 0.4rem 0.25rem 0.3rem;
}

/* --- Product Info (right) --- */
.pdp-info {
  padding: 3rem 3rem 6rem;
  border-left: 1px solid rgba(26, 24, 20, 0.07);
}

/* Header */
.pdp-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.pdp-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.pdp-subtitle {
  font-size: 1rem;
  color: var(--fg-muted);
  font-weight: 400;
  margin-bottom: 1.75rem;
}

/* Price row */
.pdp-price-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.pdp-price {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--fg);
}

.pdp-original {
  font-size: 1.1rem;
  color: var(--fg-muted);
  text-decoration: line-through;
  font-weight: 400;
}

.pdp-save-badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(200, 86, 30, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

/* Size section */
.pdp-size-section {
  margin-bottom: 1.5rem;
}

.pdp-size-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.pdp-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.pdp-size-guide-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  text-decoration: underline;
  text-decoration-color: rgba(107, 101, 88, 0.35);
}

.pdp-size-guide-btn:hover {
  color: var(--fg);
}

.pdp-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdp-size-btn {
  min-width: 3.5rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 1.5px solid rgba(26, 24, 20, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pdp-size-btn:hover {
  border-color: var(--fg);
  background: var(--card-bg);
}

.pdp-size-btn.selected {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.pdp-size-note {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 0.6rem;
  min-height: 1.2em;
  transition: color 0.2s;
}

/* Add to cart button */
.pdp-add-btn {
  width: 100%;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--fg);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 1.25rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.pdp-add-btn:hover {
  background: var(--dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.25);
}

.pdp-add-btn:active {
  transform: translateY(0);
}

.pdp-add-btn.disabled {
  background: rgba(26, 24, 20, 0.25);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pdp-add-btn.success {
  background: #16a34a;
}

.pdp-cart-icon {
  flex-shrink: 0;
}

/* Trust signals */
.pdp-trust {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.pdp-trust-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg-muted);
}

/* Story + Fabric */
.pdp-section-heading {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.pdp-story-block {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(26, 24, 20, 0.1);
  border-bottom: 1px solid rgba(26, 24, 20, 0.1);
  margin-bottom: 0;
}

.pdp-story-text {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.75;
  font-style: italic;
}

.pdp-fabric-block {
  padding: 1.75rem 0;
}

.pdp-fabric-text {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.pdp-care-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pdp-care-list li {
  font-size: 0.85rem;
  color: var(--fg-muted);
  display: flex;
  gap: 0.5rem;
}

.pdp-care-dash {
  color: var(--accent);
  font-weight: 700;
}

/* Shipping note */
.pdp-shipping-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  background: var(--bg-warm);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

/* --- Sticky bar (mobile) --- */
.pdp-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--fg);
  color: var(--bg);
  padding: 0.9rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

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

.pdp-sticky-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pdp-sticky-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.65);
}

.pdp-sticky-price {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bg);
}

.pdp-sticky-btn {
  height: 2.8rem;
  padding: 0 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.pdp-sticky-btn:hover {
  background: #b84a1a;
}

/* --- Size guide modal --- */
.pdp-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pdp-modal.open {
  opacity: 1;
  pointer-events: all;
}

.pdp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 20, 0.55);
  backdrop-filter: blur(4px);
}

.pdp-modal-inner {
  position: relative;
  background: var(--bg);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  width: calc(100vw - 2rem);
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.pdp-modal.open .pdp-modal-inner {
  transform: translateY(0);
}

.pdp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.pdp-modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.pdp-modal-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.pdp-modal-close:hover {
  background: var(--bg-warm);
}

.pdp-modal-sub {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* Size table */
.pdp-size-table {
  border: 1px solid rgba(26, 24, 20, 0.12);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.pdp-size-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
}

.pdp-size-table-header span {
  text-align: center;
}

.pdp-size-table-header span:first-child {
  text-align: left;
}

.pdp-size-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(26, 24, 20, 0.08);
  font-size: 0.85rem;
  transition: background 0.15s;
}

.pdp-size-table-row:hover {
  background: var(--bg-warm);
}

.pdp-size-table-row span {
  text-align: center;
  color: var(--fg-muted);
}

.pdp-st-row-size {
  color: var(--fg) !important;
  font-weight: 600;
}

.pdp-modal-note {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-style: italic;
  line-height: 1.6;
}

/* --- Lightbox --- */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(8px);
}

.pdp-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.pdp-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.pdp-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.pdp-lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .pdp-main {
    grid-template-columns: 1fr;
  }

  .pdp-gallery {
    position: static;
    height: auto;
    padding: 1.5rem 1.5rem 0;
    overflow: visible;
  }

  .pdp-main-img-wrap {
    aspect-ratio: 1;
    border-radius: 12px;
  }

  .pdp-thumbs {
    padding: 0.75rem 1.5rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  .pdp-info {
    padding: 1.5rem 1.5rem 7rem;
    border-left: none;
    border-top: 1px solid rgba(26, 24, 20, 0.07);
  }

  .pdp-nav {
    padding: 1rem 1.5rem;
  }

  .pdp-trust {
    gap: 0.9rem;
  }

  .pdp-sticky-bar {
    display: flex;
  }
}

@media (max-width: 480px) {
  .pdp-title { font-size: 1.6rem; }
  .pdp-price { font-size: 1.6rem; }
  .pdp-modal-inner { padding: 1.5rem; }
  .pdp-sizes { gap: 0.4rem; }
  .pdp-size-btn { min-width: 2.8rem; height: 2.6rem; font-size: 0.85rem; }
}