/* Product Detail Page */
.product-header {
  background: var(--color-plum);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.product-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-cream);
  text-decoration: none;
}

.product-logo .logo-accent {
  font-size: 0.7em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: -4px;
  color: var(--color-gold);
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-cream);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 1;
}

.product-page {
  padding: 24px 0 80px;
  min-height: 70vh;
  background: var(--color-cream);
}

.product-breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.product-breadcrumb a {
  color: var(--color-plum-mid);
  text-decoration: none;
}

.product-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--color-text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-plum);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-image-section {
  position: sticky;
  top: 80px;
}

.product-main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-blush);
  position: relative;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-main-image .product-placeholder-lg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: white;
  text-align: center;
  padding: 20px;
}

.product-badge-lg {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.product-badge-lg.new {
  background: var(--color-gold);
  color: var(--color-plum);
}

.product-info {
  padding: 8px 0;
}

.product-category-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-plum-mid);
  margin-bottom: 8px;
}

.product-info h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-plum);
  margin-bottom: 16px;
  line-height: 1.2;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.stars {
  display: flex;
  gap: 2px;
  color: var(--color-gold);
}

.stars svg.empty {
  color: var(--color-border);
}

.rating-text {
  font-size: 14px;
  color: var(--color-text-muted);
}

.product-shipping {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-blush);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--color-text);
}

.product-shipping svg {
  flex-shrink: 0;
  color: var(--color-plum-mid);
}

.product-inquiry {
  margin-bottom: 20px;
}

.inquiry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #25D366;
  color: white;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.inquiry-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
}

.product-price-section {
  margin-bottom: 24px;
}

.product-price-lg {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-plum);
}

.product-price-original {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-left: 12px;
  font-weight: 400;
}

.product-colors {
  margin-bottom: 24px;
}

.product-colors h4 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-text);
}

.color-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.color-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.color-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-square {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s;
}

.color-square:hover {
  border-color: var(--color-plum-mid);
}

.color-square.active {
  border-color: var(--color-plum);
  box-shadow: 0 0 0 1.5px var(--color-plum);
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* ---- Assurances (sits directly under the buy button) ---- */
.product-assurances {
  list-style: none;
  margin: 0 0 24px;
  padding: 18px 20px;
  background: var(--color-sand);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-assurances li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--color-ink);
}

.product-assurances svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-accent-dark);
}

.product-add-btn {
  flex: 1;
  padding: 16px 24px;
  background: var(--color-accent-dark);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.product-add-btn:hover {
  background: #8F4E26;
  transform: translateY(-1px);
}

.product-wishlist-btn {
  width: 52px;
  height: 52px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-plum-light);
  transition: all 0.2s;
  background: white;
}

.product-wishlist-btn:hover,
.product-wishlist-btn.active {
  border-color: var(--color-sale);
  color: var(--color-sale);
}

/* Reviews Section */
.product-reviews-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--color-border);
}

.product-reviews-section h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--color-blush);
  border-radius: var(--radius-lg);
}

.reviews-avg {
  text-align: center;
}

.reviews-avg .big-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-plum);
  line-height: 1;
}

.reviews-avg .review-count {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.review-form {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.review-form h4 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.star-input {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.star-input svg {
  cursor: pointer;
  color: var(--color-border);
  transition: color 0.15s;
}

.star-input svg.filled {
  color: var(--color-gold);
}

.review-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
}

.review-form textarea:focus {
  outline: none;
  border-color: var(--color-rose);
}

.review-submit-btn {
  padding: 10px 24px;
  background: var(--color-plum);
  color: var(--color-cream);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
}

.review-submit-btn:hover {
  background: var(--color-plum-mid);
}

.review-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.review-card:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

.review-date {
  font-size: 12px;
  color: var(--color-text-muted);
}

.review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
  color: var(--color-gold);
}

.review-stars svg.empty {
  color: var(--color-border);
}

.review-comment {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-light);
}

.no-reviews {
  text-align: center;
  padding: 32px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.review-prompt-banner {
  background: linear-gradient(135deg, var(--color-oat) 0%, var(--color-sand) 100%);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-prompt-icon {
  width: 44px;
  height: 44px;
  background: var(--color-gold, #D4AF37);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.review-prompt-text {
  flex: 1;
}

.review-prompt-text strong {
  display: block;
  font-size: 15px;
  color: var(--color-plum, #2D1B2E);
  margin-bottom: 2px;
}

.review-prompt-text span {
  font-size: 13px;
  color: var(--color-text-muted, #8B6F7D);
}

.review-prompt-btn {
  padding: 8px 20px;
  background: var(--color-plum, #2D1B2E);
  color: var(--color-cream, #FDF8F5);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.review-prompt-btn:hover {
  background: var(--color-plum-mid, #5C3A4E);
}

@media (max-width: 480px) {
  .review-prompt-banner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

/* Tabs */
.product-tabs {
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}

.tabs-header {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 14px 28px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--color-plum);
}

.tab-btn.active {
  color: var(--color-plum);
  border-bottom-color: var(--color-plum);
}

.tab-content {
  padding: 0 0 24px;
}

.description-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-light);
}

.description-empty {
  color: var(--color-text-muted);
  font-size: 14px;
  font-style: italic;
}

/* Related Products */
.related-products {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.related-products h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-plum);
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(45, 27, 46, 0.1);
}

.related-card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-blush);
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: white;
  text-align: center;
  padding: 12px;
}

.related-card-info {
  padding: 12px 14px;
}

.related-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-price {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-plum);
}

/* Policy Bar */
.policy-bar {
  background: white;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 28px 0;
}

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

.policy-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  padding: 16px;
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

.policy-bar-item:hover {
  background: var(--color-blush);
  color: var(--color-plum);
}

.policy-bar-item svg {
  color: var(--color-plum-mid);
}

.policy-bar-item span {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Full Footer */
.product-footer-full {
  background: var(--color-plum);
  color: var(--color-plum-light);
  padding: 48px 0 0;
}

.product-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-brand p {
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
  color: var(--color-plum-light);
}

.product-footer-full h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-cream);
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--color-plum-light);
}

.footer-col a {
  color: var(--color-gold);
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col li a {
  color: var(--color-plum-light);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col li a:hover {
  color: var(--color-cream);
}

.product-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: var(--color-plum);
  color: var(--color-cream);
  border-radius: var(--radius-full);
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-sale); }

/* Responsive */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-image-section {
    position: static;
  }

  .product-info h1 {
    font-size: 1.5rem;
  }

  .product-price-lg {
    font-size: 1.4rem;
  }

  .product-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid var(--color-border);
    z-index: 50;
    margin-bottom: 0;
  }

  .product-page {
    padding-bottom: 100px;
  }

  /* The footer sits outside <main>, so it misses the clearance above and its
     last rows end up stranded behind the fixed add-to-bag bar. */
  .product-footer-full {
    padding-bottom: 96px;
  }

  .reviews-summary {
    flex-direction: column;
    text-align: center;
  }

  .product-header-inner {
    flex-direction: row;
  }

  .product-logo {
    font-size: 1.1rem;
  }

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

  .policy-bar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .tab-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .product-page {
    padding: 16px 0 100px;
  }

  .product-info h1 {
    font-size: 1.3rem;
  }

  .inquiry-btn {
    width: 100%;
    justify-content: center;
  }

  .policy-bar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .policy-bar-item {
    padding: 12px 8px;
  }

  .policy-bar-item span {
    font-size: 12px;
  }
}
