/* Product detail page styles — Popmart SG theme */
.product-detail-container {
  max-width: 1200px;
  margin: 40px auto;
}

.back-to-shop {
  margin-bottom: 20px;
}

.back-to-shop a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9em;
  text-transform: uppercase;
}

.back-to-shop a:hover {
  text-decoration: underline;
}

/* Detail Layout Grid */
.detail-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.detail-gallery {
  flex: 1 1 0%;
  display: flex;
  gap: 20px;
  min-width: 0;
}

.thumbnail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 80px;
}

.thumb-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background-color: #f8f8f8;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.thumb-image.active {
  border-color: var(--color-coral);
}

.main-image-wrapper {
  flex: 1 1 0%;
  background-color: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
  min-width: 0;
  overflow: hidden;
}

.product-image-large {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Sidebar Info */
.detail-info {
  flex: 1 1 0%;
  max-width: 480px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
}

.delivery-estimate {
  background-color: #e5f5f0;
  color: var(--color-text);
  font-size: 0.8em;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.tag-local-express-large {
  background-color: #328169;
  color: white;
  padding: 2px 8px;
  font-weight: 700;
  margin-right: 10px;
}

.badges-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.badge-new {
  background-color: #000;
  color: white;
  padding: 4px 12px;
  font-size: 1.2em;
  font-weight: 800;
  line-height: 1;
}

.wishlist-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
}

.wishlist-btn.active {
  color: #c30010;
}

.wishlist-btn.active svg {
  fill: #c30010;
}

.product-name-detail {
  font-size: 1.8em;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}

/* Stock Status Indicators */
.stock-status {
  font-size: 0.9em;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 15px;
}

.stock-available {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.stock-low {
  background-color: #fff3e0;
  color: #e65100;
}

.stock-out {
  background-color: #ffebee;
  color: #c62828;
}

.product-price-detail {
  font-size: 1.4em;
  font-weight: 700;
  color: #d32f2f; /* Red Popmart price color */
  margin-bottom: 30px;
}

.original-price-detail {
  text-decoration: line-through;
  color: #777;
  font-size: 0.8em;
  margin-right: 10px;
}

.discounted-price-detail {
  color: #d32f2f;
  margin-right: 10px;
}

.member-discount-badge {
  display: inline-block;
  font-size: 0.65em;
  background-color: #000;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.size-section {
  margin-bottom: 30px;
}

.section-label {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.size-options {
  display: flex;
  gap: 15px;
}

.size-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  background-color: #fcfcfc;
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.2s;
}

.size-btn.active {
  border: 2px solid #000;
  background-color: #fff;
}

.size-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.quantity-section {
  margin-bottom: 30px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1.2em;
  cursor: pointer;
}

.qty-input-detail {
  width: 50px;
  height: 36px;
  text-align: center;
  border: none;
  font-weight: 600;
  font-size: 1.1em;
}

.launch-time {
  text-align: center;
  color: #d32f2f;
  font-weight: 700;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
}

.btn-black-action {
  flex: 1;
  background-color: #000;
  color: #fff;
  border: none;
  padding: 16px;
  font-weight: 800;
  font-size: 0.9em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-black-action:hover {
  opacity: 0.8;
}

.btn-black-action:disabled,
.btn-black-action[aria-disabled="true"] {
  background-color: #777;
  cursor: not-allowed;
  opacity: 0.9;
}

/* Accordions */
.accordion-item {
  border-top: 1px solid #e0e0e0;
}

.accordion-item:last-child {
  border-bottom: 1px solid #e0e0e0;
}

.detail-reviews-section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.detail-reviews-header h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.detail-reviews-header p {
  color: #6d6d6d;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.product-review-card,
.review-empty-state {
  background: #faf7f2;
  border: 1px solid #ebe2d5;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.product-review-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.product-review-text {
  margin: 0;
  color: #333;
}

.accordion-header {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
}

.accordion-content {
  display: none;
  padding-bottom: 20px;
  font-size: 0.9em;
  line-height: 1.5;
  color: var(--color-text-light);
}

.accordion-item.active .accordion-content {
  display: block;
}

.detail-links {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
}

.detail-link {
  color: #000;
  text-decoration: underline;
  font-size: 0.85em;
  font-weight: 500;
}

@media (max-width: 768px) {
  .product-detail-container {
    margin: 24px auto;
    padding: 0 12px;
  }

  .detail-layout {
    flex-direction: column;
    gap: 24px;
  }

  .detail-gallery {
    flex-direction: column-reverse;
    gap: 14px;
  }

  .thumbnail-list {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .thumb-image {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
  }

  .detail-info {
    min-width: 0;
    max-width: 100%;
  }

  .size-options {
    flex-direction: column;
  }

  .action-buttons {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
  }

  .btn-black-action {
    width: 100%;
  }

  .product-name-detail {
    font-size: 1.45em;
  }
}

