/* Product Detail Page Styles */

/* Breadcrumb Section */
.breadcrumb-section {
  padding: 120px 0 var(--space-4);
  background-color: var(--color-background);
}

.breadcrumb-section .breadcrumb {
  margin-bottom: 0;
}

/* Product Detail */
.product-detail {
  padding: var(--space-8) 0 var(--space-16);
  background-color: var(--color-background);
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* Product Gallery */
.product-gallery {
  position: sticky;
  top: 100px;
}

.gallery-main {
  position: relative;
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-zoom {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  background-color: var(--color-surface);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.gallery-zoom:hover {
  background-color: var(--color-primary);
  color: white;
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-3);
}

.thumb {
  width: 80px;
  height: 80px;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: none;
  padding: 0;
}

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

.thumb:hover,
.thumb.active {
  border-color: var(--color-primary);
}

/* Product Info Detail */
.product-info-detail {
  padding-top: var(--space-4);
}

.product-header {
  margin-bottom: var(--space-6);
}

.product-category {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.product-title-detail {
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.product-rating-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.product-rating-detail .stars {
  color: #F59E0B;
  font-size: var(--text-lg);
}

.rating-text {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.rating-count {
  color: var(--color-primary);
  font-size: var(--text-sm);
  text-decoration: underline;
}

/* Product Price Detail */
.product-price-detail {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.current-price-detail {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-primary);
}

.original-price-detail {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.discount-badge {
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-error);
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* Product Short Desc */
.product-short-desc {
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

/* Product Variants */
.product-variants {
  margin-bottom: var(--space-6);
}

.variant-group {
  margin-bottom: var(--space-4);
}

.variant-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.variant-options {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.variant-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.variant-btn:hover,
.variant-btn.active {
  border-color: var(--color-primary);
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

/* Quantity Selector */
.product-quantity {
  margin-bottom: var(--space-6);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn-detail {
  width: 48px;
  height: 48px;
  background-color: var(--color-background);
  border: none;
  font-size: var(--text-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.qty-input {
  width: 60px;
  height: 48px;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 600;
  outline: none;
}

/* Product Actions Detail */
.product-actions-detail {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.add-to-cart-detail,
.buy-now {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.wishlist-btn {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wishlist-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

/* Product Benefits */
.product-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-6);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.benefit-item svg {
  color: var(--color-success);
  flex-shrink: 0;
}

/* Shipping Info */
.shipping-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.shipping-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
}

.shipping-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.shipping-item div {
  display: flex;
  flex-direction: column;
}

.shipping-item strong {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.shipping-item span {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Product Tabs Section */
.product-tabs-section {
  padding: var(--space-16) 0;
  background-color: var(--color-surface);
}

.product-tabs {
  max-width: 900px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  gap: var(--space-2);
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-8);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: var(--space-4) var(--space-6);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

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

.tabs-content {
  min-height: 400px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tab-content-inner {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.tab-content-inner h3 {
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.tab-content-inner h4 {
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  margin: var(--space-6) 0 var(--space-3);
}

.tab-content-inner p {
  margin-bottom: var(--space-4);
}

.tab-content-inner ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.tab-content-inner li {
  margin-bottom: var(--space-2);
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

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

.specs-table td {
  padding: var(--space-4) 0;
  font-size: var(--text-base);
}

.specs-table td:first-child {
  color: var(--color-text-muted);
  width: 40%;
}

.specs-table td:last-child {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* Reviews Summary */
.reviews-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8);
  background-color: var(--color-background);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
}

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

.rating-big {
  font-size: var(--text-6xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}

.rating-stars-big {
  color: #F59E0B;
  font-size: var(--text-2xl);
  margin: var(--space-2) 0;
}

.rating-total {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.rating-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.rating-bar span:first-child {
  width: 24px;
  color: var(--color-text-muted);
}

.rating-bar span:last-child {
  width: 30px;
  text-align: right;
  color: var(--color-text-muted);
}

.bar {
  flex: 1;
  height: 8px;
  background-color: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background-color: #F59E0B;
  border-radius: var(--radius-full);
}

.write-review {
  white-space: nowrap;
}

/* Reviews List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.review-item {
  padding: var(--space-6);
  background-color: var(--color-background);
  border-radius: var(--radius-xl);
}

.review-header-detail {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.review-header-detail .review-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.review-meta-detail h4 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.review-meta-detail .review-stars {
  color: #F59E0B;
  font-size: var(--text-sm);
}

.review-meta-detail .review-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: var(--space-2);
}

.review-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.review-text {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.load-more {
  margin-top: var(--space-6);
  width: 100%;
}

/* Related Products */
.related-products {
  padding: var(--space-16) 0;
  background-color: var(--color-background);
}

.related-products .section-header {
  margin-bottom: var(--space-8);
}

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

/* Responsive */
@media (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .product-gallery {
    position: relative;
    top: 0;
  }
  
  .gallery-main {
    max-width: 500px;
    margin: 0 auto var(--space-4);
  }
  
  .gallery-thumbs {
    justify-content: center;
  }
  
  .reviews-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .rating-bars {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .related-products .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-title-detail {
    font-size: var(--text-3xl);
  }
  
  .current-price-detail {
    font-size: var(--text-3xl);
  }
  
  .product-actions-detail {
    flex-wrap: wrap;
  }
  
  .add-to-cart-detail,
  .buy-now {
    width: calc(50% - var(--space-2));
    flex: none;
  }
  
  .wishlist-btn {
    width: 100%;
    height: 48px;
  }
  
  .product-benefits {
    grid-template-columns: 1fr;
  }
  
  .tabs-header {
    gap: 0;
  }
  
  .tab-btn {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
  
  .related-products .products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .product-actions-detail {
    flex-direction: column;
  }
  
  .add-to-cart-detail,
  .buy-now {
    width: 100%;
  }
  
  .variant-options {
    flex-wrap: wrap;
  }
  
  .variant-btn {
    flex: 1;
    min-width: 100px;
  }
}