/* =============================================
   Zayrah Couture — Product Detail Page Styles
   ============================================= */

.product-detail-page {
  padding: 40px 0 100px;
  background: var(--bg);
}

/* Breadcrumbs */
.product-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.product-breadcrumb a:hover {
  color: var(--primary);
}

.product-breadcrumb .sep {
  color: rgba(200, 213, 192, 0.6);
}

.product-breadcrumb .current {
  color: var(--primary);
  font-weight: 500;
}

/* Product Main Grid */
.product-main {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}

@media (max-width: 1200px) {
  .product-main {
    gap: 32px;
  }
}

@media (max-width: 991px) {
  .product-main {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
  }
}

/* Left Column: Product Gallery */
.product-gallery {
  position: sticky;
  top: 100px;
}

@media (max-width: 991px) {
  .product-gallery {
    position: relative;
    top: 0;
  }
}

.product-gallery__main {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: rgba(200, 213, 192, 0.1);
  transition: transform var(--transition);
}

.product-gallery__main:hover {
  transform: scale(1.01);
}

.product-gallery__main img.main-image {
  width: 100%;
  aspect-ratio: 5 / 6.5;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .product-gallery__main img.main-image {
    max-height: 480px;
  }
}

.product-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.product-badge--new {
  background: var(--primary);
  color: var(--white);
}

.product-badge--sale {
  background: #a37265;
  color: var(--white);
}

.product-gallery__thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

@media (max-width: 768px) {
  .product-gallery__thumbnails {
    justify-content: center;
  }
}

.thumb-btn {
  width: 80px;
  aspect-ratio: 5 / 6.5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  opacity: 0.6;
  background: rgba(200, 213, 192, 0.1);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumb-btn:hover,
.thumb-btn.active {
  opacity: 1;
}

.thumb-btn.active {
  border-color: var(--primary);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Column: Product Meta */
.product-category {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 8px;
  display: inline-block;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--primary);
  margin: 0 0 16px;
}

@media (max-width: 576px) {
  .product-title {
    font-size: 2rem;
  }
}

.product-price-container {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

.price-regular,
.price-sale {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--primary);
}

.price-sale {
  color: #a37265;
}

.price-was {
  font-family: var(--font-body);
  font-size: 1.2rem;
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.75;
}

.product-status-row {
  margin-bottom: 24px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge-status--instock {
  background: rgba(47, 79, 62, 0.08);
  color: var(--primary);
}

.badge-status--outofstock {
  background: rgba(163, 114, 101, 0.08);
  color: #a37265;
}

.product-short-description {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid rgba(200, 213, 192, 0.3);
}

/* Actions and Buttons */
.product-actions-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  max-width: 420px;
}

@media (max-width: 991px) {
  .product-actions-box {
    max-width: 100%;
  }
}

.btn-add-to-cart {
  padding: 16px 28px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-wishlist-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  padding: 10px;
  transition: color var(--transition);
  align-self: flex-start;
}

.btn-wishlist-toggle:hover {
  color: var(--accent);
}

.btn-wishlist-toggle i.fa-solid {
  color: #a37265;
}

/* Tabs & Accordions Section */
.product-tabs {
  margin-top: 40px;
  border-top: 1.5px solid rgba(200, 213, 192, 0.3);
}

.product-tabs__nav {
  display: flex;
  gap: 24px;
  border-bottom: 1.5px solid rgba(200, 213, 192, 0.2);
  padding: 16px 0 8px;
  overflow-x: auto;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .product-tabs__nav {
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    padding-bottom: 12px;
  }
}

.product-tabs__nav::-webkit-scrollbar {
  height: 0;
}

.tab-trigger {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.tab-trigger:hover {
  color: var(--primary);
}

.tab-trigger.active {
  color: var(--primary);
  font-weight: 600;
}

.tab-trigger.active::after {
  content: '';
  position: absolute;
  bottom: -9.5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

@media (max-width: 768px) {
  .tab-trigger {
    font-size: 0.9rem;
    padding: 4px 2px;
  }
  .tab-trigger.active::after {
    bottom: -4px;
  }
}

.product-tabs__content {
  padding-top: 24px;
}

.tab-panel {
  display: none;
  animation: tabFadeIn 0.4s ease forwards;
}

.tab-panel.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-wrapper {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.policy-text {
  font-family: var(--font-body);
  color: var(--text-muted);
}

/* Mobile FAQ Accordion */
.product-accordion {
  display: none;
  margin-top: 32px;
  border-top: 1px solid rgba(200, 213, 192, 0.3);
}

@media (max-width: 768px) {
  .product-tabs {
    display: none !important;
  }
  .product-accordion {
    display: block !important;
  }
}

.accordion-item {
  border-bottom: 1px solid rgba(200, 213, 192, 0.3);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--primary);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  transition: color 0.25s ease;
}

.accordion-header:hover {
  color: var(--accent);
}

.accordion-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.accordion-collapse.show {
  max-height: 1000px;
  opacity: 1;
  padding-bottom: 20px;
}

.accordion-body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Related Products */
.related-products-section {
  border-top: 1.5px solid rgba(200, 213, 192, 0.3);
  padding-top: 80px;
  margin-top: 60px;
}

.related-products-section .section-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .related-products-section {
    padding-top: 48px;
    margin-top: 40px;
  }
  .related-products-section .section-title {
    font-size: 1.8rem;
  }
}

/* Dynamic Variants Selection Styles */
.product-variants-selection {
  margin: 28px 0 20px;
}

.variant-select-group {
  margin-bottom: 20px;
}

.variant-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.variant-btn {
  border: 1.5px solid rgba(200, 213, 192, 0.4);
  background: transparent;
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.variant-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.variant-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(47, 79, 62, 0.15);
}

#variantSelectionError {
  display: none;
  color: #a37265;
  font-size: 0.85rem;
  margin-top: 8px;
  font-weight: 500;
  font-family: var(--font-body);
}
