/* ============================================
   GABÁN - Product Page Styles
   Clean Futurism Theme
   ============================================ */

/* ---------- CSS @property for animated gradient ---------- */
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ---------- Product Accent Variable ---------- */
:root {
  --product-accent: var(--accent);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar {
  padding-top: calc(var(--nav-height) + 1rem);
  padding-bottom: 1rem;
  background: var(--bg-primary);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '›';
  color: var(--text-muted);
  font-size: 1rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb li:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* ---------- Product Hero ---------- */
#product-hero {
  padding: 2rem 0 clamp(3rem, 6vh, 5rem);
  background: var(--bg-primary);
}

/* Hero FOUC prevention — elements start hidden, GSAP animates them in.
   Note: animate the <img> child, not the .product-hero-image wrapper, so the
   wrapper background/border stays visible if JS fails to load. */
.product-hero-image img,
.product-hero-category,
.product-hero-name,
.product-hero-divider,
.product-hero-desc,
.product-hero-tag {
  opacity: 0;
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.product-hero-image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.product-hero-image {
  background: var(--bg-alt);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.product-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-hero-shadow {
  width: 60%;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.06), transparent);
  border-radius: 50%;
  margin-top: -10px;
}

.product-gallery-dots {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--duration-fast) ease;
}

.gallery-dot.active {
  background: var(--product-accent);
  width: 24px;
  border-radius: 4px;
}

.product-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-hero-category {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--product-accent);
}

.product-hero-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.product-hero-divider {
  width: 40px;
  height: 2px;
  background: var(--product-accent);
  border-radius: 1px;
}

.product-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
}

.product-hero-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.product-hero-tag {
  display: inline-flex;
  padding: 0.4rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: all var(--duration-fast) ease;
}

.product-hero-tag:hover {
  border-color: var(--product-accent);
  color: var(--product-accent);
}

.product-quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: #25D366;
  color: white;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--duration-fast) var(--ease-out-expo);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
  margin-top: 0.5rem;
  width: fit-content;
  opacity: 0;
}

.product-quote-btn:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

/* ---------- Stat Pills ---------- */
#product-stats {
  padding: clamp(2rem, 4vh, 4rem) 0;
  background: var(--bg-secondary);
}

.product-stats-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.stat-pill {
  flex: 1;
  max-width: 260px;
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.stat-pill:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--product-accent);
}

.stat-pill-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--product-accent);
  line-height: 1;
}

.stat-pill-suffix {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-weight: 700;
  color: var(--product-accent);
}

.stat-pill-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ---------- Detail Grid ---------- */
#product-details {
  padding: clamp(4rem, 8vh, 7rem) 0;
  background: var(--bg-primary);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.detail-card {
  position: relative;
  border-radius: 20px;
  padding: 2px;
  background: var(--border-light);
  transition: all var(--duration-fast) var(--ease-out-expo);
  opacity: 0;
  transform: translateY(40px);
}

.detail-card:hover {
  transform: translateY(-4px);
  background: conic-gradient(from var(--gradient-angle), var(--product-accent), var(--border-light), var(--product-accent));
  box-shadow: 0 8px 32px color-mix(in srgb, var(--product-accent) 15%, transparent);
  animation: rotateGradient 3s linear infinite;
}

@keyframes rotateGradient {
  0% { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}

.detail-card-inner {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 2rem;
  height: 100%;
}

.detail-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.detail-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--product-accent);
}

.detail-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Detail Lists */
.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.detail-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.detail-list-warning li::before {
  background: #EF4444;
}

/* Detail Steps (ordered) */
.detail-steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-steps li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 2rem;
  position: relative;
  counter-increment: steps;
}

.detail-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--product-accent);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* First Aid sub-section */
.detail-first-aid {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.detail-first-aid h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Composition Table */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.detail-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-align: left;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-table td {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--product-accent);
}

/* Manufacturer */
.detail-manufacturer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.mfg-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.mfg-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.mfg-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mfg-detail a {
  transition: color var(--duration-fast) ease;
}

.mfg-detail a:hover {
  color: var(--accent);
}

/* ---------- Related Products ---------- */
#related-products {
  padding: clamp(4rem, 8vh, 7rem) 0;
  background: var(--bg-secondary);
}

.related-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vh, 4rem);
}

.related-header .section-label::before { display: none; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Related cards use .product-card styles from style.css */
/* Reset initial state for GSAP animation */
#related-grid .product-card {
  opacity: 0;
  transform: translateY(40px);
}

/* ---------- Detail prose (native editor body) ---------- */
.product-detail-section {
  padding: clamp(3rem, 6vh, 5rem) 0;
  background: var(--bg-primary);
}

.product-detail-prose {
  max-width: 720px;
  margin-top: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.product-detail-prose h2,
.product-detail-prose h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
  line-height: 1.2;
}

.product-detail-prose p { margin-bottom: 1rem; }
.product-detail-prose ul,
.product-detail-prose ol { margin: 0 0 1rem 1.25rem; }
.product-detail-prose li { margin-bottom: 0.4rem; }
.product-detail-prose a {
  color: var(--accent);
  text-decoration: underline;
}
.product-detail-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ---------- Product gallery ---------- */
.product-gallery-section {
  padding: clamp(3rem, 6vh, 5rem) 0;
  background: var(--bg-secondary);
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.product-gallery-item {
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
}

.product-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-medium) var(--ease-out-expo);
}

.product-gallery-item:hover .product-gallery-img {
  transform: scale(1.05);
}

@media (max-width: 720px) {
  .product-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-hero-image-wrap {
    max-width: 500px;
    margin: 0 auto;
  }

  .product-hero-info {
    text-align: center;
    align-items: center;
  }

  .product-hero-tags {
    justify-content: center;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-stats-row {
    flex-wrap: wrap;
  }

  .stat-pill {
    flex: 1 1 calc(50% - 0.75rem);
    max-width: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .breadcrumb-bar {
    padding-top: calc(var(--nav-height) + 0.75rem);
  }
}

@media (max-width: 480px) {
  .stat-pill {
    flex: 1 1 100%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .product-hero-name {
    font-size: 2rem;
  }
}
