/* Product Section */
.product-section {
  margin-bottom: 20px;
}
.product-container{
 background-color: #fff;
}
.image-section {
  min-width: 280px;
}

.main-image-wrapper {
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  box-shadow: 0 10px 10px rgba(34, 197, 94, 0.3);
  margin-bottom: 16px;
}

.detail-main-image {
  width: 430px;
  margin: 0 auto; 
  background-color: #fff;
}
.detail-main-info{
 background-color: #fff;
  padding: 30px;
}
.main-image {
  width: 100%;
  max-width: 430px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.thumbs {
  display: flex;
  gap: 12px;
}
.thumb-image-container{
  width: 430px;
  margin: 0 auto;
  overflow-x: auto;       
  overflow-y: hidden;
  /* white-space: nowrap;    */
}

.thumb-image-section{
  display: inline-flex;
  gap: 10px;
}
.thumb {
  width: 90px;
  cursor: pointer;
}

.thumb {
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  background-color: #fff;
  transition: border-color 0.3s ease;
}
.thumb-image{
  max-width: 90px;
  height: 90px;
  object-fit: contain;
  margin: auto;
  display: block;
}
img.thumb{ 
  max-width: 90px;
  height: 90px;
  object-fit: contain;
  margin: auto;
  display: block;
}
.thumb.active {
  height: 100%;
  border-color: #22c55e;
}

/* Info Section */
.info-section {
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 600px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid #e5e7eb;
}

.category {
  font-weight: 600;
  font-size: 14px;
  color: #22c55e;
  margin-bottom: 6px;
}

.product-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0 0 8px 0;
}

.stock-tag {
  font-size: 12px;
  font-weight: 600;
  color: #166534;
  background-color: #dcfce7;
  padding: 2px 10px;
  border-radius: 12px;
  vertical-align: middle;
  margin-left: 12px;
}

.price {
  margin-top: 24px;
  margin-bottom: 24px;
}

.current-price {
  font-weight: 700;
  font-size: 2rem;
  color: #111827;
  margin-right: 12px;
}

.original-price {
  color: #6b7280;
  font-size: 1.5rem;
  text-decoration: line-through;
}

.description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  max-width: 520px;
}

.weight-section {
  margin-top: 30px;
}

.weight-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
}

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

.weight-btn {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.weight-btn:hover {
  color: #fff;
  background-color: #166534;
    border-color: #22c55e;

}

.weight-btn.active {
  background-color: #22c55e;
  color: white;
  border-color: #22c55e;
}

.purchase-section {
  margin-top: 30px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.quantity-control {
  border: 1.5px solid #cbd5e1;
  border-radius: 24px;
  display: flex;
  align-items: center;
}

.qty-btn {
  cursor: pointer;
  border: none;
  font-size: 18px;
  font-weight: 700;
  background: transparent;
  color: #22c55e;
  width: 40px;
  height: 40px;
  transition: background-color 0.3s ease;
}

.qty-btn:hover {
  background-color: #dcfce7;
  border-radius: 50%;
}

.quantity {
  border: none;
  font-size: 16px;
  font-weight: 600;
  width: 50px;
  text-align: center;
  outline: none;
}

.btn.btn-add-to-cart,
.btn.btn-buy-now {
  padding: 12px 32px;
  font-weight: 600;
  text-align: center;
  border-radius: 30px;
  cursor: pointer;
  border: none;
  font-size: 16px;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-add-to-cart {
  background-color: #22c55e;
  color: white;
}

.btn-add-to-cart:hover {
  background-color: #16a34a;
}

.cart-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.btn-buy-now {
  background-color: #facc15;
  color: white;
  padding-left: 28px;
  padding-right: 28px;
}

.btn-buy-now:hover {
  background-color: #eab308;
}

/* Review Section */
.review-section {
  margin-top: 64px;
  border-top: 1px solid #e5e7eb;
  padding-top: 32px;
  margin: auto;
}

.tabs {
  display: flex;
  gap: 40px;
  border-bottom: 1.5px solid #e5e7eb;
  margin-bottom: 28px;
}

.tab {
  cursor: pointer;
  padding-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 3px solid transparent;
  color: #6b7280;
  background: none;
  border: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.tab:hover {
  color: #22c55e;
}

.tab.active {
  border-bottom-color: #22c55e;
  color: #22c55e;
}


.review-content {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.rating-summary {
  flex: 1 1 150px;
  text-align: center;
}

.average-rating {
  font-size: 4rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1;
}

.stars {
  font-size: 1.75rem;
  color: #ca8a04;
  margin-top: 4px;
}

.star-half {
  position: relative;
  display: inline-block;
  color: #fde68a;
}

.review-count {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* Rating breakdown */
.rating-breakdown {
  flex: 2 1 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

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

.rating-label {
  width: 65px;
  font-weight: 600;
  font-size: 14px;
  color: #334155;
}

.rating-bar {
  flex-grow: 1;
  height: 12px;
  background-color: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background-color: #facc15;
  border-radius: 10px 0 0 10px;
}

/* Write review */
.write-review {
  flex: 1 1 280px;
}

.write-review h2 {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 18px;
  color: #111827;
}

.write-review p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

.btn-write-review {
  background: none;
  border: 2px solid #cbd5e1;
  border-radius: 30px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 14px;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.btn-write-review:hover {
  border-color: #22c55e;
  color: #22c55e;
}

[hidden] {
  display: none !important;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .main-image {
    max-height: 320px;
    object-fit: contain;
  }

  .thumb {
    width: 65px !important;
  }

  .btn-group .btn {
    font-size: 14px;
    padding: 6px 10px;
  }

  .weight-btn {
    margin-bottom: 6px;
  }

  .col-md-6 h2 {
    font-size: 26px;
  }

  .col-md-6 h3 {
    font-size: 24px;
  }

  .d-flex.gap-2 button {
    font-size: 15px;
  }
}

@media (max-width: 576px) {
  .thumb {
    width: 55px !important;
  }

  .col-md-6 h2 {
    font-size: 22px;
  }

  .col-md-6 h3 {
    font-size: 20px;
  }

  input.form-control {
    width: 60px !important;
  }
}

/* Responsive Styles */
@media (max-width: 900px) {
  .product-section {
    flex-direction: column;
    align-items: center;
  }
  .info-section,
  .image-section {
    max-width: 100%;
  }
  .purchase-section {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-buy-now,
  .btn-add-to-cart {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .main-image-wrapper {
    max-width: 300px;
    aspect-ratio: 1/1;
  }

  .thumb img {
    width: 60px;
    height: 60px;
  }

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

  .current-price {
    font-size: 1.5rem;
  }
}
