/**
 * Product detail: clean, modern eCommerce layout
 * Premium look – spacing, rounded buttons, soft shadows, responsive
 */

.product-main {
  padding-bottom: 100px;
}

.product-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ----- Top section: Product overview ----- */
.product-overview {
  padding: 1.5rem 0 2rem;
}

.product-overview-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

/* Left: Gallery */
.product-gallery-wrap {
  max-width: 100%;
}

.product-gallery {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1;
  max-height: 420px;
  background: #f8fafc;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-gallery .gallery-slide {
  display: none;
  width: 100%;
  height: 100%;
}

.product-gallery .gallery-slide.active {
  display: block;
}

.product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.product-gallery-thumbs .gallery-thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.product-gallery-thumbs .gallery-thumb:hover,
.product-gallery-thumbs .gallery-thumb.active {
  border-color: var(--color-teal, #0ca48c);
  box-shadow: 0 0 0 2px rgba(12, 164, 140, 0.2);
}

.product-gallery-thumbs .gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.product-gallery-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.product-gallery-dots .dot.active {
  background: var(--color-teal, #0ca48c);
}

/* Right: Info */
.product-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.product-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.product-breadcrumb a:hover {
  color: var(--color-teal, #0ca48c);
}

.breadcrumb-sep {
  margin: 0 0.35rem;
}

.breadcrumb-current {
  color: #0f172a;
  font-weight: 500;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.product-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-price-block .product-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  background: var(--gradient, linear-gradient(135deg, #0ca48c, #0d9488));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-price-block .product-mrp {
  font-size: 1.1rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}

.product-category-badge {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.product-category-badge .product-meta-label {
  margin-right: 0.35rem;
}

.product-category-link {
  color: var(--color-teal, #0ca48c);
  font-weight: 600;
  text-decoration: none;
}

.product-category-link:hover {
  text-decoration: underline;
}

.product-short-desc-block {
  margin: 0.5rem 0 0;
}

.product-short-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* Quantity selector */
.product-qty-block {
  margin: 0.25rem 0 0;
}

.product-qty-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.product-qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-qty-selector .qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.product-qty-selector .qty-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.product-qty-selector .product-qty-input {
  width: 52px;
  height: 44px;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  -moz-appearance: textfield;
}

.product-qty-selector .product-qty-input::-webkit-outer-spin-button,
.product-qty-selector .product-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Action buttons */
.product-actions-block {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.5rem;
}

.product-actions-block .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
}

.product-actions-block .btn:hover {
  transform: translateY(-1px);
}

.product-actions-block .btn-primary {
  background: var(--gradient, linear-gradient(135deg, #0ca48c, #0d9488));
  color: #fff;
  box-shadow: 0 4px 14px rgba(12, 164, 140, 0.35);
}

.product-actions-block .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(12, 164, 140, 0.4);
}

.product-actions-block .btn-outline {
  background: #fff;
  color: #0f172a;
  border: 2px solid #e2e8f0;
}

.product-actions-block .btn-outline:hover {
  border-color: var(--color-teal, #0ca48c);
  color: var(--color-teal, #0ca48c);
}

.product-actions-block .btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.product-actions-block .btn-whatsapp:hover {
  background: #20bd5a;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

/* Meta: stock, SKU, category */
.product-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.9rem;
}

.product-meta-label {
  color: #64748b;
  font-weight: 500;
  min-width: 90px;
}

.product-meta-value {
  color: #0f172a;
}

.product-meta-link {
  color: var(--color-teal, #0ca48c);
  text-decoration: none;
}

.product-meta-link:hover {
  text-decoration: underline;
}

.stock-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.stock-badge.in-stock {
  background: rgba(12, 164, 140, 0.12);
  color: var(--color-teal, #0ca48c);
}

.stock-badge.out-of-stock {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* ----- Tabbed details section ----- */
.product-details-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid #e2e8f0;
}

.product-tab {
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: color 0.2s, background 0.2s;
}

.product-tab:hover {
  color: #0f172a;
  background: #f8fafc;
}

.product-tab.active {
  color: var(--color-teal, #0ca48c);
  border-bottom-color: var(--color-teal, #0ca48c);
  background: #fff;
}

.product-tab-panels {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-tab-panel {
  display: none;
  padding: 1.75rem 1.5rem;
}

.product-tab-panel.active {
  display: block;
}

.product-tab-panel[hidden] {
  display: none !important;
}

.product-tab-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

.product-description-text,
.product-ingredients-text {
  margin: 0;
  white-space: pre-wrap;
}

.product-spec-list {
  margin: 0;
  display: grid;
  gap: 0.75rem 1.5rem;
}

.product-spec-list dt {
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
  margin: 0;
}

.product-spec-list dd {
  margin: 0;
  color: #334155;
  white-space: pre-wrap;
}

.product-detail-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.product-info-text,
.product-uses-text,
.product-description-text,
.product-ingredients-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #475569;
}

.product-faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.product-faq-item:last-child {
  border-bottom: none;
}

.product-faq-question {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.product-faq-answer {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #475569;
}

.product-tab-empty {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}

/* ----- Reviews ----- */
.section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #0f172a;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-teal, #0ca48c);
}

.product-reviews-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.reviews-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.review-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.review-item:last-child {
  border-bottom: none;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.review-author {
  font-weight: 600;
  color: #0f172a;
}

.review-rating {
  color: #eab308;
  letter-spacing: 0.05em;
}

.review-stars-dim {
  color: #e2e8f0;
}

.review-date {
  font-size: 0.85rem;
  color: #64748b;
}

.review-comment {
  margin: 0;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
}

.reviews-empty {
  color: #64748b;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.review-form-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.review-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #0f172a;
}

.review-form .form-row {
  margin-bottom: 1rem;
}

.review-form .form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

.review-form .required {
  color: #dc2626;
}

.review-form .form-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s;
}

.review-form .form-input:focus {
  outline: none;
  border-color: var(--color-teal, #0ca48c);
}

.review-form .form-textarea {
  min-height: 100px;
  resize: vertical;
}

.rating-stars {
  display: flex;
  gap: 4px;
  font-size: 1.5rem;
  color: #e2e8f0;
}

.rating-stars .star-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  transition: color 0.2s, transform 0.2s;
}

.rating-stars .star-btn:hover,
.rating-stars .star-btn.active {
  color: #eab308;
}

.rating-stars .star-btn:hover {
  transform: scale(1.15);
}

.review-form .form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.review-form .form-message {
  margin: 0;
  font-size: 0.9rem;
}

.review-form .form-message.success {
  color: var(--color-teal, #0ca48c);
}

.review-form .form-message.error {
  color: #dc2626;
}

/* ----- Sticky Add to Cart bar (mobile) ----- */
.product-add-bar {
  position: fixed;
  bottom: var(--bottom-nav-height, 70px);
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.product-add-bar .add-bar-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  flex-shrink: 0;
}

.add-bar-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.add-bar-qty-wrap .qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-bar-qty-wrap .add-bar-qty {
  width: 40px;
  height: 36px;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  -moz-appearance: textfield;
}

.add-bar-qty-wrap .add-bar-qty::-webkit-outer-spin-button,
.add-bar-qty-wrap .add-bar-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-add-bar .btn {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 12px;
  font-weight: 600;
}

.product-add-bar .btn.btn-outline {
  flex: 0 1 auto;
}

/* ----- Desktop layout ----- */
@media (min-width: 768px) {
  .product-overview-layout {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .product-gallery-wrap {
    position: sticky;
    top: calc(var(--header-height, 60px) + 24px);
  }

  .product-gallery {
    max-width: 100%;
    margin: 0;
  }

  .product-name {
    font-size: 1.75rem;
  }

  .product-add-bar {
    display: none;
  }

  /* Reviews + form side by side */
  .product-reviews-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 2.5rem;
    align-items: start;
  }

  .product-reviews-section .section-heading {
    grid-column: 1 / -1;
  }

  .product-reviews-section .reviews-list,
  .product-reviews-section .reviews-empty {
    grid-column: 1;
  }

  .product-reviews-section .reviews-list {
    margin-bottom: 0;
  }

  .product-reviews-section .review-form-wrap {
    grid-column: 2;
    margin-top: 0;
  }
}

@media (min-width: 992px) {
  .product-overview-layout {
    grid-template-columns: 460px 1fr;
  }

  .product-tab-panels {
    padding: 0;
  }

  .product-tab-panel {
    padding: 2rem 2rem;
  }
}
