/* ═══ Page atmosphere — grid + spotlight (like homepage) ═══ */
.product-page {
  position: relative;
  isolation: isolate;
}

.product-page__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.product-page__spotlight {
  position: absolute;
  left: 50%;
  top: 28%;
  width: min(1000px, 120vw);
  height: min(720px, 90vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse 50% 48% at 50% 50%,
    rgba(255, 196, 140, 0.16) 0%,
    rgba(255, 160, 100, 0.08) 30%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 72%
  );
  filter: blur(40px);
}

.product-page__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 24%, black 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 24%, black 15%, transparent 78%);
}

.product-page > :not(.product-page__bg) {
  position: relative;
  z-index: 1;
}

/* ═══ Hero shell ═══ */
.product-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 8px;
}

.product-hero__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.product-hero__line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.06) 75%,
    transparent 100%
  );
}

.product-hero__inner {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + 28px);
}

/* ═══ Breadcrumb ═══ */
.product-info__breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.product-info__breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.product-info__breadcrumb a:hover {
  color: var(--text-primary);
}

.product-info__breadcrumb-sep {
  opacity: 0.35;
}

.product-info__breadcrumb-current {
  color: var(--text-secondary);
}

/* ═══ UI8-style header — info top, actions right ═══ */
.product-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding-bottom: 48px;
}

.product-header__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-info__title {
  font-size: clamp(1.75rem, 3.8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
}

.product-platforms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-platform__icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.product-platform--wordpress {
  color: #7eb7e8;
  border-color: rgba(33, 117, 155, 0.35);
}

.product-platform--woocommerce {
  color: #c9a8f0;
  border-color: rgba(127, 84, 179, 0.4);
}

.product-platform--figma {
  color: #f0b4c8;
  border-color: rgba(242, 78, 126, 0.3);
}

.product-platform__label {
  line-height: 1;
}

.add-to-cart.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Aside — purchase */
.product-header__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: min(100%, 280px);
}

.product-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-header__actions .btn--primary {
  padding-inline: 22px;
  font-weight: 600;
  white-space: nowrap;
}

.product-info__price {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-info__note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: right;
  margin: 0;
  max-width: 280px;
}

.product-info__note a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.product-info__note a:hover {
  color: var(--text-primary);
}

/* ═══ Bento gallery 2×2 ═══ */
.product-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 40px;
}

.product-bento__cell {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.product-bento__cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.product-bento__cell:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
}

.product-bento__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-bento__cell:hover img {
  transform: scale(1.02);
}

.product-bento__cell--skeleton {
  background: linear-gradient(
    110deg,
    var(--bg-surface) 0%,
    var(--bg-elevated) 45%,
    var(--bg-surface) 90%
  );
  background-size: 200% 100%;
  animation: bento-shimmer 1.4s ease-in-out infinite;
}

@keyframes bento-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ═══ Tabs ═══ */
.product-tabs {
  margin-top: 56px;
  padding-bottom: 48px;
}

.product-tabs__nav {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.product-tabs__nav .tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  border-bottom: none;
  margin-bottom: 0;
}

.product-tabs__nav .tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  border-bottom: none;
  margin-bottom: 0;
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
}

.product-tabs__nav .tab:hover {
  color: var(--text-primary);
}

.product-tabs__nav .tab.is-active {
  color: var(--accent-on);
  background: var(--accent);
}

.product-tabs__content {
  max-width: 680px;
  margin-inline: auto;
  padding-top: 0;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  text-align: center;
}

.product-tabs__content p {
  margin: 0;
}

/* ═══ Related ═══ */
.product-related {
  padding-block: 48px 64px;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.018) 100%);
}

.product-related__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.product-related__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-related__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

@media (max-width: 900px) {
  .product-hero__inner {
    padding-top: calc(var(--header-h) + 20px);
  }

  .product-header {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 36px;
  }

  .product-header__aside {
    align-items: stretch;
    width: 100%;
  }

  .product-header__actions {
    justify-content: stretch;
  }

  .product-header__actions .btn {
    flex: 1;
    justify-content: center;
  }

  .product-info__note {
    text-align: left;
    max-width: none;
  }

  .product-bento {
    margin-top: 32px;
    gap: 10px;
  }

  .product-page__spotlight {
    top: 18%;
  }

  .product-tabs {
    margin-top: 40px;
  }

  .product-tabs__nav .tab {
    padding: 9px 16px;
    font-size: 13px;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  .product-bento__cell:hover,
  .product-bento__cell:hover img {
    transform: none;
  }

  .product-bento__cell--skeleton {
    animation: none;
  }
}
