/* ============================================
   FREEZEAL — Product Details Page Styles
   ============================================ */

/* ── Product Detail Layout ── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* ── Product Gallery ── */
.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.product-gallery__main {
  background: linear-gradient(135deg, var(--bg-pink-subtle), var(--bg-pink-light));
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  margin-bottom: var(--space-md);
  overflow: hidden;
  position: relative;
}

.product-gallery__main-image {
  max-width: 80%;
  max-height: 350px;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

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

.product-gallery__main-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: var(--primary);
}

.product-gallery__main-placeholder svg {
  opacity: 0.6;
}

.product-gallery__main-placeholder span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-gallery__thumbs {
  display: flex;
  gap: var(--space-sm);
}

.product-gallery__thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--bg-pink-subtle);
  border: 2px solid var(--border-light);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.product-gallery__thumb:hover,
.product-gallery__thumb--active {
  border-color: var(--primary);
  box-shadow: var(--shadow-pink);
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Product Info ── */
.product-info {
  padding-top: var(--space-md);
}

.product-info__badge-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.product-info__name {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.product-info__sku {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.product-info__description {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  margin-bottom: var(--space-2xl);
}

/* ── Quick Specs ── */
.quick-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--bg-grey-light);
  border-radius: var(--radius-lg);
}

.quick-spec {
  text-align: center;
}

.quick-spec__value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
}

.quick-spec__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

/* ── Pack Size Selector ── */
.pack-selector {
  margin-bottom: var(--space-2xl);
}

.pack-selector__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-heading);
}

.pack-selector__options {
  display: flex;
  gap: var(--space-sm);
}

.pack-option {
  padding: 12px 24px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pack-option:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pack-option--active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* ── Product Actions ── */
.product-actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

/* ── Product Tabs ── */
.product-tabs {
  margin-top: var(--space-3xl);
}

.product-tabs__nav {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--border-light);
  margin-bottom: var(--space-2xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.product-tabs__tab {
  padding: 14px 24px;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-base);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.product-tabs__tab:hover {
  color: var(--primary);
}

.product-tabs__tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.product-tabs__panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.product-tabs__panel--active {
  display: block;
}

/* ── Features List ── */
.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-grey-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.feature-item:hover {
  background: var(--primary-ultra-light);
  transform: translateX(4px);
}

.feature-item__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary-ultra-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item__text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 0;
}

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

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

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

.specs-table th {
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-heading);
  width: 200px;
  background: var(--bg-grey-light);
}

.specs-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-body);
}

/* ── Usage Instructions ── */
.usage-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  counter-reset: step;
}

.usage-step {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-grey-light);
  border-radius: var(--radius-md);
  counter-increment: step;
}

.usage-step__number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usage-step__text {
  font-size: var(--text-sm);
  color: var(--text-body);
  margin-bottom: 0;
}

/* ── Key Feature Icons ── */
.key-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  background: var(--bg-pink-light);
  border-radius: var(--radius-xl);
}

.key-feature {
  text-align: center;
}

.key-feature__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-white);
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.key-feature__label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0;
}

/* ── Related Products ── */
.related-products {
  margin-top: var(--space-4xl);
}

.related-products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

/* ── Download & CTA ── */
.product-cta-bar {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-2xl);
  background: var(--bg-grey-light);
  border-radius: var(--radius-xl);
  margin-top: var(--space-2xl);
  align-items: center;
}

.product-cta-bar__text {
  flex: 1;
}

.product-cta-bar__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.product-cta-bar__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .product-detail {
    gap: var(--space-2xl);
  }

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

  .features-list {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-gallery {
    position: static;
  }

  .product-gallery__main {
    min-height: 300px;
    padding: var(--space-2xl);
  }

  .product-info__name {
    font-size: var(--text-2xl);
  }

  .quick-specs {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
  }

  .product-tabs__nav {
    gap: 0;
  }

  .product-tabs__tab {
    padding: 12px 16px;
    font-size: var(--text-xs);
  }

  .key-features-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-lg);
  }

  .related-products__grid {
    grid-template-columns: 1fr;
  }

  .product-cta-bar {
    flex-direction: column;
    text-align: center;
  }

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

  .pack-selector__options {
    flex-wrap: wrap;
  }
}

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

  .specs-table th {
    width: 120px;
    padding: var(--space-sm) var(--space-md);
  }

  .specs-table td {
    padding: var(--space-sm) var(--space-md);
  }
}
