/* Each section has a unique class — there is no shared .section wrapper class. */

:root {
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
}

/* --- DETAILS GRID LAYOUT --- */
.product-details-block {
  background-color: var(--bg-white);
  padding: var(--space-lg) 0;
}

.product-details-block .section-container {
  padding: 0 var(--space-md);
}

.details-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: var(--space-lg);
  align-items: start;
}

/* --- LEFT COLUMN: IMAGE GALLERY --- */
.details-gallery-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* Prevents Swiper slider from expanding grid layout infinitely */
}

.main-image-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg-white);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  box-shadow: var(--shadow);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.main-image-container .badge {
  top: 20px;
  left: 20px;
  font-size: 0.8rem;
  padding: 6px 14px;
}

.main-product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

/* Thumbnail strip styling */
.thumbnail-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item {
  flex: 0 0 80px;
  height: 80px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: var(--bg-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: var(--transition);
}

.thumb-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.thumb-item:hover,
.thumb-item.active {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 156, 168, 0.2);
}

/* --- RIGHT COLUMN: PRODUCT INFO --- */
.details-info-column {
  display: flex;
  flex-direction: column;
}

.info-category-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: inline-block;
}

.details-info-column h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-dark);
}

/* Ratings row */
.ratings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.stars-list {
  font-size: 1rem;
}

.ratings-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Price row */
.details-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.details-price-row .price-sale {
  font-size: 2rem;
}

.details-price-row .price-original {
  font-size: 1.35rem;
}

/* Short description */
.info-short-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 30px;
}

.info-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0 0 28px;
}

/* Quantity and Action Widgets */
.add-to-cart-widget {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.quantity-controller {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg-light);
  overflow: hidden;
  height: 48px;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 44px;
  height: 100%;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 0.9rem;
  transition: var(--transition);
}

.qty-btn:hover {
  background-color: var(--border);
}

.qty-input {
  width: 50px;
  border: none;
  background: transparent;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.action-buttons .btn-primary {
  flex: 1.5;
  height: 48px;
}

.action-buttons .btn-outline {
  flex: 1;
  height: 48px;
  white-space: nowrap;
}

.button-icon {
  margin-left: 8px;
}

/* Metadata list */
.info-meta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.info-meta-list p {
  font-size: 0.95rem;
}

.meta-label {
  font-weight: 600;
  color: var(--text-muted);
  width: 100px;
  display: inline-block;
}

.meta-value {
  color: var(--text-dark);
}

.badge-status {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.badge-status.instock {
  background-color: #e6f6f7;
  color: var(--primary);
}

.badge-status.outstock {
  background-color: #fdf2f2;
  color: #de3535;
}

.badge-status i {
  margin-right: 4px;
}

/* Share icons */
.share-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.share-links {
  display: flex;
  gap: 10px;
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
}

.share-btn.fb { background-color: #3b5998; }
.share-btn.tw { background-color: #1da1f2; }
.share-btn.pin { background-color: #bd081c; }
.share-btn.mail { background-color: var(--primary); }

.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- PRODUCT DESCRIPTION SECTION --- */
.product-description-section {
  background-color: #f8f9fa;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: var(--space-lg) 0;
}

.product-description-section .section-container {
  max-width: 800px;
  padding: 0 var(--space-md);
}

.product-description-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-dark);
}

.description-content-wrapper {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.description-content-wrapper p {
  margin-bottom: var(--space-sm);
}

.description-content-wrapper h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: var(--space-md) 0 var(--space-sm);
}

.description-content-wrapper ul {
  padding-left: 28px;
  list-style-type: disc;
  margin-bottom: var(--space-md);
  border-left: 3px solid #00c896;
}

.description-content-wrapper li {
  margin-bottom: var(--space-xs);
}

.related-products {
  padding: var(--space-xl) 0 !important;
}

.related-products .section-container {
  padding: 0 var(--space-md);
}

/* Specifications Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table tr:first-child {
  border-top: 1px solid var(--border);
}

.specs-table td {
  padding: 16px 24px;
}

.spec-name {
  font-weight: 600;
  color: var(--text-dark);
  width: 30%;
  background-color: var(--bg-light);
}

.spec-value {
  color: var(--text-muted);
  width: 70%;
}

/* Reviews List */
.reviews-wrapper {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.reviews-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.reviews-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg-white);
  box-shadow: var(--shadow);
}

.review-meta {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid var(--border);
}

.reviewer-details {
  flex-grow: 1;
}

.reviewer-details h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

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

.reviewer-rating {
  font-size: 0.85rem;
}

.review-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- KEYFRAMES --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- RESPONSIVE PRODUCT --- */
@media (max-width: 992px) {
  .details-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .specs-table td {
    padding: 12px 16px;
  }
}

@media (max-width: 600px) {
  .details-info-column h1 {
    font-size: 1.75rem;
  }
  
  .add-to-cart-widget {
    flex-direction: column;
    align-items: stretch;
  }
  
  .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .action-buttons button {
    width: 100%;
  }
  
  .tab-btn {
    font-size: 0.95rem;
  }
  
  .tabs-nav-bar {
    gap: 16px;
    justify-content: space-between;
  }
}

/* --- RELATED PRODUCTS SECTION --- */
.related-products {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

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

@media (max-width: 1100px) {
  .related-products .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .related-products .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .related-products .products-grid {
    grid-template-columns: 1fr;
  }
}

/* --- THUMBNAIL SLIDER --- */
.thumbnail-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  width: 100%;
  margin-top: 16px;
}

.thumbSwiper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.thumbSwiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Override existing thumb-item margin to fit Swiper slide width */
.thumbnail-slider-wrapper .thumb-item {
  flex: 1;
  width: 100%;
  height: 80px;
  margin: 0;
}

.thumb-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.thumb-nav-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
}

.thumb-nav-btn.swiper-button-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
