/* ============================================
   SPAZIO — Product Detail Page Styles
   Same design system as homepage
   ============================================ */

/* ---- Breadcrumb ---- */
.pdp-breadcrumb {
  padding: 7.5rem 0 1.5rem 0;
  background-color: var(--color-bg-base);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.breadcrumb-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb-nav a:hover {
  color: var(--color-brand-red);
}

.breadcrumb-sep {
  font-size: 0.55rem;
  color: var(--color-border);
}

.breadcrumb-current {
  color: var(--color-text-dark);
  font-weight: 600;
}

/* ---- Product Main Layout ---- */
.pdp-main {
  background-color: var(--color-bg-base);
  padding: 1rem 0 5rem 0;
}

.pdp-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ---- Gallery ---- */
.pdp-gallery {
  position: sticky;
  top: 6rem;
}

.pdp-main-image {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background-color: #EAE6DF;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}

.pdp-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-main-image:hover img {
  transform: scale(1.04);
}

.pdp-zoom-btn {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  color: var(--color-text-dark);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pdp-zoom-btn:hover {
  background: var(--color-brand-red);
  color: #fff;
  transform: scale(1.08);
}

.pdp-image-badge {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: var(--color-brand-red);
  color: #fff8f5;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 20px;
}

/* Thumbnails */
.pdp-thumbnails {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pdp-thumb {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #EAE6DF;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.pdp-thumb:hover img {
  transform: scale(1.06);
}

.pdp-thumb.active {
  border-color: var(--color-brand-red);
  box-shadow: 0 0 0 2px rgba(194, 47, 25, 0.15);
}

/* ---- Product Info ---- */
.pdp-info {
  padding-top: 0.5rem;
}

.pdp-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-brand-red);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

.pdp-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

/* Rating */
.pdp-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pdp-stars {
  display: flex;
  gap: 0.2rem;
  color: #D4A747;
  font-size: 0.85rem;
}

.pdp-rating-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Price */
.pdp-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pdp-price {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.pdp-price-old {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.pdp-discount {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-brand-red);
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  letter-spacing: 0.02em;
}

/* Description */
.pdp-description {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
}

/* ---- Attributes ---- */
.pdp-attributes {
  margin-bottom: 2rem;
}

.pdp-attr-group {
  margin-bottom: 1.25rem;
}

.pdp-attr-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.65rem;
}

/* Color Swatches */
.pdp-color-options {
  display: flex;
  gap: 0.65rem;
}

.pdp-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
  outline-offset: 3px;
}

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

.pdp-color-swatch.active {
  border-color: var(--color-text-dark);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* Material Buttons */
.pdp-material-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pdp-material-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 24px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-dark);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
}

.pdp-material-btn:hover {
  border-color: var(--color-text-dark);
}

.pdp-material-btn.active {
  background: var(--color-text-dark);
  color: #fff;
  border-color: var(--color-text-dark);
}

/* ---- Actions ---- */
.pdp-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

/* Quantity */
.pdp-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: 30px;
  overflow: hidden;
}

.pdp-qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--color-text-dark);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pdp-qty-btn:hover {
  background: #F8F4F0;
}

.pdp-qty-input {
  width: 36px;
  text-align: center;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--color-text-dark);
  -moz-appearance: textfield;
}

.pdp-qty-input::-webkit-inner-spin-button,
.pdp-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Add to Cart */
.pdp-add-to-cart {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--color-brand-red);
  color: #fff8f5;
  border: none;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}

.pdp-add-to-cart:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.pdp-add-to-cart.added {
  background: #2D8B4E;
}

/* Wishlist */
.pdp-wishlist-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-dark);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.pdp-wishlist-btn:hover {
  border-color: var(--color-brand-red);
  color: var(--color-brand-red);
}

.pdp-wishlist-btn.active {
  background: var(--color-brand-red);
  border-color: var(--color-brand-red);
  color: #fff;
}

/* ---- Trust Badges ---- */
.pdp-trust {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

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

.pdp-trust-item i {
  color: var(--color-brand-red);
  font-size: 0.85rem;
}

/* ---- Accordion ---- */
.pdp-accordions {
  margin-bottom: 1rem;
}

.pdp-accordion {
  border-bottom: 1px solid var(--color-border);
}

.pdp-accordion:first-child {
  border-top: none;
}

.pdp-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
  transition: color 0.3s;
}

.pdp-accordion-header:hover {
  color: var(--color-brand-red);
}

.pdp-accordion-header i {
  font-size: 0.65rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--color-text-muted);
}

.pdp-accordion-header[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.pdp-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
  padding: 0 0;
}

.pdp-accordion-body.open {
  max-height: 350px;
  padding: 0 0 1.25rem 0;
}

.pdp-accordion-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pdp-accordion-body li {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.pdp-accordion-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-brand-red);
  opacity: 0.5;
}

/* ---- Related Products ---- */
.pdp-related {
  background: #fff8f5;
  padding: 5rem 0;
}

.pdp-related-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.pdp-related-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--color-text-dark);
}

.pdp-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.pdp-related-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

.pdp-related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.pdp-related-img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #EAE6DF;
}

.pdp-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-related-card:hover .pdp-related-img img {
  transform: scale(1.06);
}

.pdp-related-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.35s ease;
}

.pdp-related-card:hover .pdp-related-overlay {
  opacity: 1;
  transform: translateY(0);
}

.pdp-related-quick,
.pdp-related-fav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: var(--color-text-dark);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdp-related-quick:hover,
.pdp-related-fav:hover {
  background: var(--color-brand-red);
  color: #fff;
}

.pdp-related-info {
  padding: 1rem 1.15rem 1.25rem;
}

.pdp-related-info h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.3rem;
}

.pdp-related-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-brand-red);
}

/* ---- Zoom Modal ---- */
.pdp-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-out;
}

.pdp-zoom-modal.active {
  opacity: 1;
  visibility: visible;
}

.pdp-zoom-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-zoom-modal.active img {
  transform: scale(1);
}

.pdp-zoom-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.pdp-zoom-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .pdp-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .pdp-gallery {
    position: static;
  }

  .pdp-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .pdp-trust {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .pdp-breadcrumb {
    padding: 6.5rem 0 1rem 0;
  }

  .pdp-main {
    padding: 0.5rem 0 3rem 0;
  }

  .pdp-main-image {
    border-radius: 18px;
  }

  .pdp-thumbnails {
    gap: 0.5rem;
  }

  .pdp-thumb {
    border-radius: 10px;
  }

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

  .pdp-actions {
    flex-wrap: wrap;
  }

  .pdp-add-to-cart {
    min-width: 100%;
    order: -1;
  }

  .pdp-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .pdp-related-info {
    padding: 0.75rem 0.85rem 1rem;
  }

  .pdp-related-info h3 {
    font-size: 0.75rem;
  }
}
