/* Lightbox & Gallery System - İkramedya Carpet CMS */

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

/* Gallery Component */
.product-gallery-container {
  position: relative;
  width: 100%;
}

.gallery-main-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--color-surface-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}

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

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

.gallery-zoom-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(33, 29, 26, 0.65);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 2;
}

/* Thumbnails */
.gallery-thumbs-track {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: thin;
}

.gallery-thumb-btn {
  flex: 0 0 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  background-color: var(--color-surface-soft);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.65;
}

.gallery-thumb-btn:hover {
  opacity: 0.9;
}

.gallery-thumb-btn.active {
  border-color: var(--color-primary);
  opacity: 1;
}

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

/* Product Info & Sticky Panel */
.product-summary-panel {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}

.product-badge-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.product-collection-link {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-decoration: none;
}

.product-code-badge {
  font-size: 0.75rem;
  background: var(--color-surface-soft);
  color: var(--color-text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.product-main-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--color-secondary);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.product-short-desc {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* Action CTA Buttons */
.product-cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.btn-whatsapp-inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background-color: #25D366;
  color: #FFFFFF;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-inquiry:hover {
  background-color: #1EBE5D;
  transform: translateY(-1px);
}

.btn-catalog-inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background-color: var(--color-surface);
  color: var(--color-secondary);
  border: 1.5px solid var(--color-border);
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-catalog-inquiry:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-surface-soft);
  transform: translateY(-1px);
}

/* Sales Channels */
.sales-channels-box {
  margin-top: var(--space-4);
}

.sales-channels-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  letter-spacing: 0.05em;
}

.sales-channels-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.btn-sales-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sales-channel:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-sales-channel:hover i,
.btn-sales-channel:hover span {
  color: #fff;
}

/* Attributes Table */
.specs-table-container {
  margin-top: var(--space-8);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

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

.specs-table th {
  text-align: left;
  padding: var(--space-3) 0;
  color: var(--color-text-muted);
  font-weight: 500;
  width: 40%;
}

.specs-table td {
  padding: var(--space-3) 0;
  color: var(--color-text);
  font-weight: 600;
}

/* Product & Collection Description Section */
.product-description-section {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.product-description-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
  color: var(--color-secondary);
}

.product-description-content {
  line-height: 1.8;
  color: var(--color-text);
  width: 100%;
  max-width: none;
}

.related-products-section {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.related-products-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: var(--space-6);
  color: var(--color-secondary);
}

/* Lightbox Modal Dialog */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 12, 10, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(8px);
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: min(90vw, 1400px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: min(90vw, 1400px);
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  user-select: none;
}

.lightbox-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  font-size: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 2010;
}

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

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  font-size: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 2010;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 12px;
}

/* Responsive Media Queries */
@media (max-width: 991px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .product-summary-panel {
    position: static;
  }
}

@media (max-width: 576px) {
  .gallery-thumbs-track {
    gap: var(--space-2);
  }

  .gallery-thumb-btn {
    flex: 0 0 64px;
    height: 64px;
  }

  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

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