/*
 * Brilliant Earth Exact Layout CSS
 * Based on the official Brilliant Earth product page design
 * Version 2.0.0 - Updated for 2-column gallery layout
 */

/* Main container layout */
.be-exact-layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 3rem;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Left side: Gallery section - matches target proportions */
.be-gallery-section {
  flex: 0 0 65%;
  min-width: 0;
}

.be-image-gallery {
  width: 100%;
}

/* Gallery rows with different aspect ratios to match target exactly */
.be-gallery-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Default gallery items */
.be-gallery-item {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* First row: Main image (square) + Hand image (portrait) */
.be-gallery-row:nth-child(1) .be-gallery-item:nth-child(1) {
  aspect-ratio: 1 / 1; /* Main product image - square */
}

.be-gallery-row:nth-child(1) .be-gallery-item:nth-child(2) {
  aspect-ratio: 3 / 4; /* Hand image - taller portrait */
}

/* Second row: Side view + Detail view (both square) */
.be-gallery-row:nth-child(2) .be-gallery-item {
  aspect-ratio: 1 / 1;
}

/* Third row: Technical + Lifestyle (both square) */
.be-gallery-row:nth-child(3) .be-gallery-item {
  aspect-ratio: 1 / 1;
}

/* Fourth row: Video + Extra (both square) */
.be-gallery-row:nth-child(4) .be-gallery-item {
  aspect-ratio: 1 / 1;
}

/* Bottom row: Full width hand comparison - wide format */
.be-gallery-row.be-full-width {
  margin-top: 1.5rem;
}

.be-gallery-row.be-full-width .be-gallery-item {
  aspect-ratio: 16 / 9; /* Wide format for hand comparison */
  border-radius: 12px;
}

.be-gallery-item:hover {
  transform: scale(1.02);
}

.be-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Video overlay */
.be-video-item {
  position: relative;
}

.be-video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.be-video-overlay svg {
  fill: white;
  margin-left: 4px;
}

/* Hand size controls */
.hand-size-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.skin-tone-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-label {
  font-size: 11px;
  font-weight: 500;
  color: #666;
  margin-right: 4px;
}

.skin-tone-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.skin-tone-btn[data-tone="light"] {
  background: #f4d5b2;
}

.skin-tone-btn[data-tone="medium"] {
  background: #d2b48c;
}

.skin-tone-btn[data-tone="dark"] {
  background: #8b6f47;
}

.skin-tone-btn.active,
.skin-tone-btn:hover {
  border-color: #2d3748;
  transform: scale(1.1);
}

/* Right side: Product info section - matches target proportions */
.be-product-info-section {
  flex: 0 0 35%;
  min-width: 280px;
  max-width: 400px;
}

.be-product-sidebar {
  position: sticky;
  top: 2rem;
}

.be-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Breadcrumb */
.be-breadcrumb {
  margin-bottom: 0.5rem;
}

.be-breadcrumb-link {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  text-decoration: none;
}

.be-breadcrumb-link:hover {
  color: #374151;
}

/* Product title */
.be-product-title {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

/* Product price */
.be-product-price {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #1f2937;
}

.be-price-note {
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
}

/* Product rating */
.be-product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.be-stars {
  display: flex;
  gap: 2px;
}

.be-star {
  width: 16px;
  height: 16px;
  fill: #f59e0b;
}

.be-rating-text {
  font-size: 14px;
  color: #6b7280;
}

/* Option groups */
.be-option-group {
  margin-bottom: 1.5rem;
}

.be-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.be-option-label {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.be-option-value {
  font-size: 14px;
  color: #6b7280;
}

/* Shape options */
.be-shape-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.be-shape-btn {
  width: 48px;
  height: 48px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.be-shape-btn:hover {
  border-color: #9ca3af;
  background: white;
}

.be-shape-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Metal options */
.be-metal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.be-metal-btn {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.be-metal-btn:hover {
}

.be-metal-btn.be-selected {
}

.be-metal-color {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

/* Carat slider */
.be-carat-slider {
  padding: 1rem 0;
}

.be-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 0.5rem;
}

.be-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1f2937;
  cursor: pointer;
}

.be-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1f2937;
  cursor: pointer;
  border: none;
}

.be-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
}

/* Select dropdown */
.be-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s ease;
}

.be-select:focus {
  border-color: #6b7280;
}

/* Action buttons */
.be-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0 1.5rem 0;
}

.be-add-to-bag-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: #183e40;
  color: white;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  outline: none;
}

.be-add-to-bag-btn:hover {
  background: #111827;
}

.be-add-to-wishlist-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: white;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  outline: none;
}

.be-add-to-wishlist-btn:hover {
  background: #f9fafb;
}

.be-add-to-wishlist-btn.be-wishlist-added {
  background: #f3f4f6;
  color: #6b7280;
  cursor: default;
}

/* Brilliant Earth difference block */
.be-difference-block {
  background: #059669;
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

.be-difference-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.be-checkmark {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  fill: currentColor;
}

.be-difference-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.be-difference-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.be-feature {
  display: flex;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.4;
}

.be-feature-check {
  width: 12px;
  height: 12px;
  margin-right: 0.5rem;
  margin-top: 2px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .be-exact-layout {
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
  }

  .be-gallery-row {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .be-product-info-section {
    max-width: none;
  }

  .be-product-sidebar {
    position: static;
  }

  .be-product-title {
    font-size: 24px;
  }

  .be-shape-options {
    gap: 0.5rem;
  }

  .be-shape-btn {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .be-gallery-row {
    flex-direction: column;
  }

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

  .be-gallery-row.be-full-width .be-gallery-item {
    aspect-ratio: 16 / 10;
  }

  .be-shape-options {
    justify-content: center;
  }
}

/* Utility classes */
.opacity-50 {
  opacity: 0.5;
}

.pointer-events-none {
  pointer-events: none;
}

/* Animation for smooth transitions */
* {
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

img {
  transition: transform 0.2s ease;
}

/* Focus states for accessibility */
.be-shape-btn:focus,
.be-metal-btn:focus,
.be-select:focus,
.be-add-to-bag-btn:focus,
.be-add-to-wishlist-btn:focus {
}

/* Print styles */
@media print {
  .be-exact-layout {
    display: block;
  }

  .be-actions,
  .be-difference-block {
    display: none;
  }
}
