/* Template 03: Gallery - Image-focused showcase design */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  padding: 16px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-count {
  width: 24px;
  height: 24px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.btn-nav {
  background: #1a1a1a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-nav:hover {
  background: #333;
}

/* Product Hero */
.product-hero {
  padding: 100px 0 60px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  align-items: start;
}

/* Gallery Section */
.gallery-section {
  min-height: 600px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-main {
  grid-column: span 2;
}

.gallery-item-main img {
  aspect-ratio: 16/10;
}

.zoom-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.gallery-item:hover .zoom-btn {
  opacity: 1;
  transform: translateY(0);
}

.zoom-btn svg {
  width: 20px;
  height: 20px;
}

/* Product Sidebar */
.product-sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.product-tag {
  display: inline-block;
  background: #f5f5f5;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.product-sidebar h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.product-tagline {
  color: #666;
  font-size: 16px;
  margin-bottom: 24px;
}

/* Price Section */
.price-section {
  padding: 20px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.price-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price {
  font-size: 36px;
  font-weight: 700;
}

.price-original {
  font-size: 20px;
  color: #999;
  text-decoration: line-through;
}

.price-savings {
  color: #16a34a;
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

/* Variants */
.variants-section {
  margin-bottom: 20px;
}

.variants-section label,
.quantity-section label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.variant-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variant-btn {
  padding: 12px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.variant-btn:hover {
  border-color: #999;
}

.variant-btn.active {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: white;
}

/* Quantity */
.quantity-section {
  margin-bottom: 24px;
}

.quantity-picker {
  display: flex;
  align-items: center;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  width: fit-content;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #f5f5f5;
}

.qty-input {
  width: 60px;
  height: 44px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
}

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

/* Add to Cart Button */
.btn-add-cart {
  display: block;
  width: 100%;
  background: #1a1a1a;
  color: white;
  padding: 18px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  transition: all 0.2s;
  margin-bottom: 24px;
}

.btn-add-cart:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Shipping Info */
.shipping-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shipping-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shipping-icon {
  font-size: 24px;
}

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

.shipping-item strong {
  font-size: 14px;
  font-weight: 600;
}

.shipping-item span {
  font-size: 13px;
  color: #666;
}

/* Features Section */
.features-section {
  padding: 100px 0;
  background: #fafafa;
}

.section-heading {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 48px;
  text-align: center;
}

.features-list {
  max-width: 800px;
  margin: 0 auto;
}

.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #e5e5e5;
}

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

.feature-number {
  font-size: 14px;
  font-weight: 700;
  color: #999;
  min-width: 40px;
}

.feature-text {
  font-size: 18px;
  line-height: 1.6;
}

/* Description Section */
.description-section {
  padding: 100px 0;
}

.description-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.description-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

.description-content p {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

.description-image {
  border-radius: 20px;
  overflow: hidden;
}

.description-image img {
  width: 100%;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e5e5;
  padding: 16px 0;
  transform: translateY(100%);
  transition: transform 0.3s;
  z-index: 90;
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-product {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sticky-product img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.sticky-product strong {
  display: block;
  font-size: 14px;
}

.sticky-product span {
  font-size: 16px;
  font-weight: 700;
}

.btn-sticky {
  background: #1a1a1a;
  color: white;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-sticky:hover {
  background: #333;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
  padding: 48px 0;
  text-align: center;
  background: #fafafa;
}

.footer p {
  color: #999;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sidebar-sticky {
    position: static;
  }

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

  .description-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

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

  .gallery-item-main {
    grid-column: span 1;
  }

  .gallery-item-main img {
    aspect-ratio: 1;
  }

  .product-sidebar h1 {
    font-size: 26px;
  }

  .price {
    font-size: 28px;
  }

  .section-heading {
    font-size: 28px;
  }

  .sticky-product strong {
    display: none;
  }
}
