/* ============================================
   MAISON NOIR — Product Page Styles
   ============================================ */

/* ── Page reset ── */
.pd-page {
  min-height: 100vh;
  background: #fff;
}

/* ── Mini header ── */
.pd-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side-pad);
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.pd-header-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}
.pd-header-back:hover { color: var(--noir); }
.pd-header-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--noir);
  text-decoration: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.pd-header-cart {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--noir);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  position: relative;
}
.pd-cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--gold);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Mini footer ── */
.pd-footer {
  border-top: 1px solid #e8e8e8;
  margin-top: 4rem;
}
.pd-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--side-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.pd-footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--noir);
  text-decoration: none;
}
.pd-footer-copy {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #888;
}
.pd-footer-links {
  display: flex;
  gap: 1.5rem;
}
.pd-footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}
.pd-footer-links a:hover { color: var(--noir); }

/* ── Breadcrumb ── */
.pd-breadcrumb {
  padding: 1.25rem var(--side-pad) 0;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}
.pd-breadcrumb a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}
.pd-breadcrumb a:hover { color: var(--noir); }
.pd-breadcrumb span { color: #bbb; }
.pd-breadcrumb .pd-bc-current { color: var(--noir); }

/* ── Main layout ── */
.pd-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--side-pad) 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Gallery ── */
.pd-gallery {
  position: sticky;
  top: 100px;
}
.pd-gallery-main {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--grey-100);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.pd-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
  display: block;
}
.pd-gallery-main img.fading {
  opacity: 0;
  transform: scale(1.03);
}
.pd-gallery-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}
.pd-gallery-badge.new { background: var(--noir); color: #fff; }
.pd-gallery-badge.bestseller { background: var(--gold); color: #fff; }
.pd-gallery-badge.sale { background: #c0392b; color: #fff; }

.pd-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.pd-thumb {
  flex: 1;
  aspect-ratio: 1;
  background: var(--grey-100);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.pd-thumb:hover {
  border-color: rgba(0,0,0,0.35);
}
.pd-thumb:hover img { transform: scale(1.05); }
.pd-thumb.active {
  border-color: var(--noir);
  box-shadow: inset 0 0 0 2px #fff, 0 4px 12px -4px rgba(0,0,0,0.3);
}

/* ── Product info panel ── */
.pd-info {
  padding-top: 0.5rem;
}
.pd-category-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}
.pd-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--noir);
  margin-bottom: 0.75rem;
}
.pd-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.pd-stars {
  display: flex;
  gap: 0.15rem;
}
.pd-star {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
.pd-star.half { opacity: 0.5; }
.pd-rating-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #888;
}
.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e8e8e8;
}
.pd-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--noir);
}
.pd-compare {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #bbb;
  text-decoration: line-through;
}
.pd-save-badge {
  background: #fdf0f0;
  color: #c0392b;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* ── Color selector ── */
.pd-option-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--noir);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pd-option-label span {
  font-weight: 400;
  color: #888;
  letter-spacing: 0;
  text-transform: none;
}
.pd-colors {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.pd-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color 0.2s, transform 0.2s;
}
.pd-color-swatch:hover { transform: scale(1.1); }
.pd-color-swatch.active { outline-color: var(--noir); }

/* ── Size selector ── */
.pd-sizes {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.pd-size-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d5d5d5;
  background: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--noir);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pd-size-btn:hover {
  border-color: var(--noir);
}
.pd-size-btn.active {
  background: var(--noir);
  border-color: var(--noir);
  color: #fff;
}
.pd-size-btn.out-of-stock {
  color: #ccc;
  cursor: not-allowed;
  position: relative;
}
.pd-size-btn.out-of-stock::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 60%;
  height: 1px;
  background: #ccc;
}
.pd-size-guide-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #888;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  letter-spacing: 0.05em;
}
.pd-size-guide-link:hover { color: var(--noir); }

/* ── Quantity stepper ── */
.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.pd-qty-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--noir);
}
.pd-qty {
  display: flex;
  align-items: center;
  border: 1px solid #d5d5d5;
  gap: 0;
}
.pd-qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--noir);
  transition: background 0.15s;
}
.pd-qty-btn:hover { background: #f5f0e8; }
.pd-qty-val {
  width: 44px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border-left: 1px solid #d5d5d5;
  border-right: 1px solid #d5d5d5;
  line-height: 40px;
  user-select: none;
}

/* ── CTA buttons ── */
.pd-cta-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.pd-btn-primary {
  flex: 1;
  padding: 1.1rem 1.5rem;
  min-height: 56px;
  background: var(--noir);
  color: #fff;
  border: 2px solid var(--noir);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s, letter-spacing 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.4);
}
.pd-btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  letter-spacing: 0.2em;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(201,169,110,0.55);
}
.pd-btn-primary:active { transform: translateY(0) scale(0.98); }
.pd-btn-primary.added {
  background: #2a7c5f;
  border-color: #2a7c5f;
}
.pd-btn-primary:disabled,
.pd-btn-primary[disabled] {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  letter-spacing: 0.16em;
}
.pd-btn-wishlist {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #d5d5d5;
  background: #fff;
  cursor: pointer;
  font-size: 1.35rem;
  color: var(--noir);
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.2s;
  flex-shrink: 0;
}
.pd-btn-wishlist:hover {
  border-color: var(--noir);
  color: var(--noir);
  transform: translateY(-2px);
}
.pd-btn-wishlist.saved {
  border-color: #c0392b;
  background: #c0392b;
  color: #fff;
}
.pd-btn-wishlist.saved:hover {
  background: #a02414;
  border-color: #a02414;
}

/* ── Short desc ── */
.pd-short-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e8e8e8;
}

/* ── Accordions ── */
.pd-accordions {
  display: flex;
  flex-direction: column;
}
.pd-accordion {
  border-bottom: 1px solid #e8e8e8;
}
.pd-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.pd-accordion-trigger-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--noir);
}
.pd-accordion-icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
}
.pd-accordion-icon::before,
.pd-accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--noir);
  transition: transform 0.3s, opacity 0.3s;
}
.pd-accordion-icon::before {
  width: 18px;
  height: 1px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.pd-accordion-icon::after {
  width: 1px;
  height: 18px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}
.pd-accordion.open .pd-accordion-icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}
.pd-accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}
.pd-accordion.open .pd-accordion-body {
  max-height: 600px;
}
.pd-accordion-content {
  padding-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.825rem;
  line-height: 1.8;
  color: #555;
}
.pd-accordion-content p { margin: 0 0 0.75rem; }
.pd-accordion-content p:last-child { margin-bottom: 0; }
.pd-accordion-content ul {
  padding-left: 1.25rem;
  margin: 0;
  list-style: none;
}
.pd-accordion-content ul li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.4rem;
}
.pd-accordion-content ul li::before {
  content: '—';
  position: absolute;
  left: -1rem;
  color: var(--gold);
}

/* ── Service strip ── */
.pd-service-strip {
  display: flex;
  gap: 0;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  margin: 4rem 0 0;
}
.pd-service-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1rem;
  gap: 0.5rem;
  border-right: 1px solid #e8e8e8;
}
.pd-service-item:last-child { border-right: none; }
.pd-service-icon {
  width: 24px;
  height: 24px;
  color: var(--gold);
}
.pd-service-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--noir);
}
.pd-service-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #888;
  line-height: 1.5;
}

/* ── Related products ── */
.pd-related {
  max-width: var(--max-w);
  margin: 5rem auto 4rem;
  padding: 0 var(--side-pad);
}
.pd-related-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}
.pd-related-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 300;
  color: var(--noir);
}
.pd-related-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--noir);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.pd-related-link:hover { opacity: 0.6; }
.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pd-related-card {
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.pd-related-img {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--grey-100);
  margin-bottom: 1rem;
}
.pd-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.pd-related-card:hover .pd-related-img img {
  transform: scale(1.04);
}
.pd-related-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--noir);
  margin-bottom: 0.25rem;
}
.pd-related-price {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #888;
}

/* ── Size guide modal ── */
.pd-sg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.pd-sg-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.pd-sg-modal {
  background: #fff;
  width: min(600px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
}
.pd-sg-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
}
.pd-sg-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--noir);
}
.pd-sg-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
}
.pd-sg-table th {
  background: var(--noir);
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.pd-sg-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
}
.pd-sg-table tr:nth-child(even) td { background: #fafafa; }

/* ── Toast ── */
.pd-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(4rem);
  background: var(--noir);
  color: #fff;
  padding: 0.85rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  z-index: 1000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
}
.pd-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pd-main { gap: 2.5rem; }
  .pd-related-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

@media (max-width: 768px) {
  .pd-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 1rem;
  }
  .pd-gallery { position: static; }
  .pd-related-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-service-strip { flex-wrap: wrap; }
  .pd-service-item { flex: 1 1 50%; border-right: none; border-bottom: 1px solid #e8e8e8; }
  .pd-service-item:nth-child(odd) { border-right: 1px solid #e8e8e8; }
  .pd-service-item:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .pd-related-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .pd-thumbs { gap: 0.35rem; }
  .pd-cta-row { flex-direction: row; }
  .pd-sizes { gap: 0.35rem; }
  .pd-size-btn { width: 46px; height: 46px; min-height: 44px; }
}
