/* ===========================================
   Product Page Styles - Verdanisse Design
   Professional outdoor e-commerce styling
   =========================================== */

/* ===========================================
   CSS Variables for Product Page
   =========================================== */
:root {
  --product-price-color: #ffffff;
  --product-sale-color: #c7642f;
  --product-trust-icon: #1a1a1a;
  --product-border: #e5e7eb;
  --product-bg-light: #f9fafb;
}

/* ===========================================
   Product Page Layout
   =========================================== */
.product-page {
  display: block; /* CRITICAL: Reset the grid from main.css */
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.product-page-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.product-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Main product layout - 60/40 split Verdanisse layout */
.product-main {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ===========================================
   Product Gallery - Verdanisse Style
   =========================================== */
.product-gallery {
  position: sticky;
  top: 7rem;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--product-bg-light);
  margin-bottom: 1rem;
  position: relative;
  cursor: zoom-in;
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.gallery-main:hover .gallery-main-image {
  transform: scale(1.02);
}

/* Gallery badges */
.gallery-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gallery-badge__item {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
}

.gallery-badge__item--sale {
  background: var(--product-sale-color);
  color: #fff;
}

.gallery-badge__item--new {
  background: var(--product-price-color);
  color: #fff;
}

/* Thumbnail strip - horizontal below main image */
.gallery-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.gallery-thumbnail {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--product-bg-light);
  transition: border-color 0.15s ease, opacity 0.15s ease;
  opacity: 0.7;
}

.gallery-thumbnail:hover {
  opacity: 1;
  border-color: #999;
}

.gallery-thumbnail.active {
  border-color: var(--product-price-color);
  opacity: 1;
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===========================================
   Product Info Panel - Right Side
   =========================================== */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Brand name - linked, uppercase */
.product-brand {
  margin-bottom: 0.25rem;
}

.product-brand a,
.product-brand span {
  color: var(--product-price-color);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.product-brand a:hover {
  color: #151515;
  text-decoration: underline;
}

/* Product title */
.product-name {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 0.75rem 0;
}

/* Star rating row */
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--product-border);
}

.product-rating__stars {
  display: flex;
  gap: 2px;
  color: #c7642f;
}

.product-rating__stars svg {
  width: 16px;
  height: 16px;
}

.product-rating__count {
  font-size: 0.8125rem;
  color: #6b7280;
}

.product-rating__count a {
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-rating__count a:hover {
  color: var(--product-price-color);
}

/* ===========================================
   Pricing Section - Large & Prominent
   =========================================== */
.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--product-price-color);
  letter-spacing: -0.5px;
}

.product-price--sale {
  color: var(--product-sale-color);
}

.product-compare-price {
  font-size: 1.125rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.product-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: var(--product-sale-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 3px;
}

/* VAT info text */
.product-vat-info {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}

/* ===========================================
   Stock & Delivery Information
   =========================================== */
.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.stock-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stock-in {
  background: #d1fae5;
  color: #065f46;
}

.stock-in::before {
  background: #10b981;
}

.stock-low {
  background: #fef3c7;
  color: #92400e;
}

.stock-low::before {
  background: #c7642f;
}

.stock-out {
  background: #fee2e2;
  color: #991b1b;
}

.stock-out::before {
  background: #ef4444;
}

/* Delivery time info */
.product-delivery {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background: var(--product-bg-light);
  border-radius: 4px;
}

.product-delivery svg {
  width: 18px;
  height: 18px;
  color: var(--product-price-color);
  flex-shrink: 0;
}

/* ===========================================
   Product Short Description
   =========================================== */
.product-short-description {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.65;
  margin: 0 0 1.5rem 0;
}

/* ===========================================
   Product Options (Color/Size Selectors)
   =========================================== */
.product-options {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--product-border);
}

.product-option {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-option__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-option__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Size/option buttons */
.product-option__btn {
  min-width: 48px;
  height: 40px;
  padding: 0 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background: #fff;
  border: 2px solid var(--product-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.product-option__btn:hover {
  border-color: #9ca3af;
}

.product-option__btn.active,
.product-option__btn--selected {
  border-color: var(--product-price-color);
  background: var(--product-price-color);
  color: #fff;
}

.product-option__btn:disabled,
.product-option__btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Color swatches */
.product-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--product-border);
  cursor: pointer;
  padding: 2px;
  transition: all 0.15s ease;
}

.product-color-swatch:hover {
  border-color: #9ca3af;
}

.product-color-swatch.active,
.product-color-swatch--selected {
  border-color: var(--product-price-color);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--product-price-color);
}

.product-color-swatch__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ===========================================
   Product Actions - Add to Cart Row
   =========================================== */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.product-actions__row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--product-border);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.quantity-btn {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #374151;
}

.quantity-btn:hover {
  background: var(--product-bg-light);
}

.quantity-btn:active {
  background: #e5e7eb;
}

.quantity-btn svg {
  width: 18px;
  height: 18px;
}

.quantity-input {
  width: 52px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #1f3a2e;
  border: none;
  border-left: 1px solid var(--product-border);
  border-right: 1px solid var(--product-border);
  background: #fff;
  -moz-appearance: textfield;
}

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

.quantity-input:focus {
  outline: none;
}

/* Add to Cart Button - Full width, dark prominent */
.add-to-cart-btn {
  flex: 1;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.add-to-cart-btn.added {
  background: var(--product-price-color);
}

.add-to-cart-btn svg {
  width: 20px;
  height: 20px;
}

/* Alternative: Green add to cart */
.add-to-cart-btn--green {
  background: var(--product-price-color);
}

.add-to-cart-btn--green:hover {
  background: #151515;
}

/* ===========================================
   Secondary Actions (Wishlist, Compare)
   =========================================== */
.product-secondary-actions {
  display: flex;
  gap: 0.75rem;
}

.product-action-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  color: #374151;
  border: 1px solid var(--product-border);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.product-action-btn:hover {
  border-color: #9ca3af;
  background: var(--product-bg-light);
}

.product-action-btn svg {
  width: 18px;
  height: 18px;
}

.product-action-btn--wishlist:hover {
  color: #ef4444;
  border-color: #fca5a5;
}

.product-action-btn--compare:hover {
  color: var(--product-price-color);
  border-color: var(--product-price-color);
}

/* ===========================================
   Trust Badges Row
   =========================================== */
.product-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--product-border);
  border-bottom: 1px solid var(--product-border);
  margin-bottom: 1.5rem;
}

.product-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.product-trust__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--product-trust-icon);
  margin-top: 1px;
}

.product-trust__text {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.product-trust__text strong {
  display: block;
  color: #374151;
  font-weight: 600;
}

/* ===========================================
   Product Features / Key Points
   =========================================== */
.product-features {
  margin-top: 0;
}

.features-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.75rem 0;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.4;
}

.feature-check {
  width: 18px;
  height: 18px;
  color: var(--product-price-color);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===========================================
   Product Tabs Section
   =========================================== */
.product-tabs {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--product-border);
}

.tabs-header {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--product-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  color: #374151;
}

.tab-btn.active {
  color: var(--product-price-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--product-price-color);
}

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

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.description-content {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #4b5563;
}

.description-content p {
  margin: 0 0 1rem 0;
}

.description-content p:last-child {
  margin-bottom: 0;
}

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

.spec-row {
  border-bottom: 1px solid var(--product-border);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-name {
  padding: 0.875rem 1rem;
  font-weight: 600;
  color: #374151;
  width: 35%;
  text-align: left;
  background: var(--product-bg-light);
  font-size: 0.875rem;
}

.spec-value {
  padding: 0.875rem 1rem;
  color: #4b5563;
  font-size: 0.875rem;
}

.no-specs {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.875rem;
}

/* ===========================================
   "At a Glance" Section (Verdanisse style)
   =========================================== */
.product-glance {
  background: var(--product-bg-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.product-glance__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-glance__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.product-glance__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-glance__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  color: var(--product-price-color);
  flex-shrink: 0;
}

.product-glance__icon svg {
  width: 18px;
  height: 18px;
}

.product-glance__text {
  font-size: 0.8125rem;
  color: #4b5563;
}

.product-glance__text strong {
  display: block;
  color: #ffffff;
  font-weight: 600;
}

/* ===========================================
   Related Products / Carousels
   =========================================== */
.related-products,
.product-carousel-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--product-border);
}

.related-title,
.carousel-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1.5rem 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Carousel controls */
.carousel-container {
  position: relative;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--product-border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carousel-nav:hover {
  background: var(--product-bg-light);
  border-color: #9ca3af;
}

.carousel-nav--prev {
  left: -20px;
}

.carousel-nav--next {
  right: -20px;
}

.carousel-nav svg {
  width: 20px;
  height: 20px;
  color: #374151;
}

/* ===========================================
   Reviews Section
   =========================================== */
.product-reviews {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--product-border);
}

.reviews-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.reviews-summary__number {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.reviews-summary__stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  color: #c7642f;
  margin-top: 0.5rem;
}

.reviews-summary__stars svg {
  width: 18px;
  height: 18px;
}

.reviews-summary__count {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.reviews-bars {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 200px;
}

.reviews-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.reviews-bar__label {
  width: 40px;
  color: #6b7280;
}

.reviews-bar__track {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.reviews-bar__fill {
  height: 100%;
  background: var(--product-price-color);
  border-radius: 3px;
}

.reviews-bar__count {
  width: 24px;
  text-align: right;
  color: #9ca3af;
}

.reviews-cta {
  align-self: center;
}

/* Individual review */
.review-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--product-border);
}

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

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.review-stars {
  display: flex;
  gap: 2px;
  color: #c7642f;
}

.review-stars svg {
  width: 14px;
  height: 14px;
}

.review-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.review-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.review-text {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.6;
}

/* ===========================================
   Product Not Found
   =========================================== */
.product-not-found {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.not-found-content {
  text-align: center;
  max-width: 480px;
}

.not-found-icon {
  width: 72px;
  height: 72px;
  color: #d1d5db;
  margin: 0 auto 1.5rem;
}

.not-found-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.75rem 0;
}

.not-found-content p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 2rem 0;
  font-size: 0.9375rem;
}

.not-found-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 1024px) {
  .product-main {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-trust {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .product-page {
    padding: 1rem;
  }

  .product-page-header {
    padding: 0.5rem 1rem;
  }

  .product-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-gallery {
    position: static;
  }

  .gallery-main {
    aspect-ratio: 4/3;
  }

  .gallery-thumbnail {
    width: 64px;
    height: 64px;
  }

  .product-name {
    font-size: 1.375rem;
  }

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

  .product-actions__row {
    flex-direction: column;
  }

  .quantity-selector {
    width: 100%;
    justify-content: center;
  }

  .add-to-cart-btn {
    width: 100%;
  }

  .product-secondary-actions {
    flex-direction: column;
  }

  .product-action-btn {
    width: 100%;
    min-height: 48px;
  }

  .product-trust {
    grid-template-columns: 1fr;
  }

  .product-trust__text {
    font-size: 0.8125rem;
  }

  .product-glance__grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .tabs-header {
    gap: 0;
  }

  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }

  .reviews-header {
    flex-direction: column;
    gap: 1.5rem;
  }

  .reviews-summary {
    width: 100%;
  }
}

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

  .gallery-thumbnails {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .gallery-thumbnail {
    width: 56px;
    height: 56px;
  }

  .product-option__btn {
    min-width: 44px;
    height: 36px;
    padding: 0 0.625rem;
    font-size: 0.8125rem;
  }

  .product-actions__row {
    flex-direction: row;
    gap: 0.75rem;
    align-items: stretch;
  }

  .quantity-selector {
    width: auto;
    flex-shrink: 0;
    border-width: 1px;
    border-radius: 6px;
  }

  .quantity-btn {
    width: 36px;
    min-height: 40px;
  }

  .quantity-btn svg {
    width: 14px;
    height: 14px;
  }

  .quantity-input {
    width: 36px;
    font-size: 0.875rem;
  }

  .add-to-cart-btn {
    flex: 1;
    height: 52px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    letter-spacing: 0.3px;
  }
}
