/* ============================================
   MODERN PRODUCT PAGE REDESIGN
   Inspired by: Amazon, Apple, ASOS
   ============================================ */

:root {
  --primary-color: #007bff;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --dark-color: #1a1a1a;
  --light-gray: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PRODUCT CONTAINER
   ============================================ */
.product-modern-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* ============================================
   IMAGE GALLERY - Left Side
   ============================================ */
.product-gallery-modern {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.main-image-container {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1/1;
}

.main-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.5s ease;
}

.main-product-image:hover {
  transform: scale(1.05);
}

/* Zoom badge */
.zoom-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

/* Thumbnail Gallery */
.thumbnail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.thumbnail-item {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}

.thumbnail-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.thumbnail-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

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

/* ============================================
   PRODUCT INFO - Right Side (Sticky)
   ============================================ */
.product-info-sticky {
  position: sticky;
  top: 80px;
  height: fit-content;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

/* Breadcrumbs Modern */
.breadcrumbs-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.breadcrumbs-modern a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs-modern a:hover {
  color: var(--primary-color);
}

.breadcrumbs-modern .separator {
  color: #ccc;
}

/* Product Title */
.product-title-modern {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px 0;
  color: var(--dark-color);
}

/* Brand Badge */
.brand-badge {
  display: inline-block;
  background: var(--light-gray);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 16px;
}

/* Rating Section */
.rating-section-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.stars-display {
  display: flex;
  gap: 2px;
  color: #ffc107;
  font-size: 18px;
}

.rating-text {
  font-size: 14px;
  color: #666;
}

.rating-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
}

.rating-link:hover {
  text-decoration: underline;
}

/* Price Section */
.price-section-modern {
  margin-bottom: 24px;
}

.price-current {
  font-size: 36px;
  font-weight: 700;
  color: var(--dark-color);
  line-height: 1;
  margin: 0;
}

.price-old {
  font-size: 20px;
  color: #999;
  text-decoration: line-through;
  margin-left: 12px;
}

.price-discount {
  display: inline-block;
  background: var(--danger-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 12px;
}

.price-currency {
  font-size: 24px;
  font-weight: 600;
  color: #666;
  margin-left: 4px;
}

/* Stock Status */
.stock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}

.stock-status.in-stock {
  color: var(--success-color);
}

.stock-status.out-of-stock {
  color: var(--danger-color);
}

.stock-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Color Variants */
.variants-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.variants-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  display: block;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.variant-item {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.variant-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.variant-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.variant-item.unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

.variant-item.unavailable::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -10%;
  width: 120%;
  height: 2px;
  background: #dc3545;
  transform: rotate(-45deg);
}

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

/* Key Specs Highlights */
.key-specs-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.spec-chip {
  background: var(--light-gray);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.spec-chip-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.spec-chip-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-color);
}

/* CTA Buttons */
.cta-section {
  margin-bottom: 24px;
}

.btn-add-to-cart-modern {
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-add-to-cart-modern:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-add-to-cart-modern:active {
  transform: translateY(0);
}

.btn-add-to-cart-modern.in-cart {
  background: var(--success-color);
}

.btn-buy-now {
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

.btn-buy-now:hover {
  background: var(--primary-color);
  color: white;
}

/* Social Share - Minimalistic */
.social-share-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.share-label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.social-icons {
  display: flex;
  gap: 8px;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: #666;
  text-decoration: none;
}

.social-icon-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* ============================================
   TABS SECTION (Below product info)
   ============================================ */
.product-tabs-modern {
  margin-top: 60px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  background: var(--light-gray);
}

.tab-button {
  flex: 1;
  padding: 16px 24px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  position: relative;
  top: 2px;
}

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

.tab-button.active {
  color: var(--primary-color);
  background: white;
  border-bottom-color: var(--primary-color);
}

.tabs-content {
  padding: 32px;
}

.tab-pane {
  display: none;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Specifications Table */
.specs-table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

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

.specs-table-modern tr:last-child {
  border-bottom: none;
}

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

.specs-table-modern .spec-name {
  font-weight: 600;
  color: #333;
  width: 35%;
}

.specs-table-modern .spec-value {
  color: #666;
}

.specs-table-modern .spec-value a {
  color: var(--primary-color);
  text-decoration: none;
}

.specs-table-modern .spec-value a:hover {
  text-decoration: underline;
}

/* Description Content */
.description-content {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.description-content h1,
.description-content h2,
.description-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

.description-content p {
  margin-bottom: 16px;
}

.description-content ul,
.description-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.description-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

/* Reviews Section */
.reviews-container {
  max-width: 100%;
}

.review-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reviewer-name {
  font-weight: 600;
  color: var(--dark-color);
}

.review-date {
  font-size: 13px;
  color: #999;
}

.review-stars {
  color: #ffc107;
  margin-bottom: 8px;
}

.review-text {
  color: #666;
  line-height: 1.6;
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */
.related-products-section {
  margin-top: 60px;
}

.section-title-modern {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--dark-color);
}

.products-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.product-card-modern {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.product-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.product-card-info {
  padding: 16px;
}

.product-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-color);
}

/* ============================================
   DELIVERY INFO CARD
   ============================================ */
.delivery-card-modern {
  background: var(--light-gray);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

.delivery-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--dark-color);
}

.delivery-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delivery-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.delivery-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.delivery-text {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

.delivery-text strong {
  color: var(--dark-color);
}

/* ============================================
   SKELETON LOADERS
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 32px;
  width: 80%;
  margin-bottom: 16px;
}

.skeleton-price {
  height: 40px;
  width: 150px;
  margin-bottom: 16px;
}

.skeleton-button {
  height: 50px;
  width: 100%;
  border-radius: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
  .product-gallery-modern,
  .product-info-sticky {
    position: static;
  }

  .product-info-sticky {
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .product-modern-container {
    padding: 12px;
    padding-top: 80px;
  }

  .breadcrumbs-modern {
    margin-top: 12px;
  }

  .product-info-sticky {
    padding: 20px;
  }

  .product-title-modern {
    font-size: 22px;
  }

  .price-current {
    font-size: 28px;
  }

  .tabs-nav {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: 120px;
  }

  .tabs-content {
    padding: 20px 16px;
  }

  .products-grid-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .thumbnail-gallery {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
}

@media (max-width: 480px) {
  .product-title-modern {
    font-size: 18px;
  }

  .price-current {
    font-size: 24px;
  }

  .btn-add-to-cart-modern,
  .btn-buy-now {
    padding: 14px 24px;
    font-size: 14px;
  }

  .key-specs-modern {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-muted {
  color: #999 !important;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }