/* Product detail — Thai Charm editorial (pairs with tca-editorial-tokens.css) */

:root {
  --pd-bar-h: 3.75rem;
  --pd-header-h: var(--nav-h);
}

body.pd-page.store-page {
  padding: 0;
  padding-bottom: calc(var(--pd-bar-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 769px) {
  body.pd-page.store-page {
    padding: var(--space-md) var(--space-md) calc(var(--dock-h) + var(--space-md));
  }
}

.pd-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .pd-wrap {
    padding-inline: var(--space-md);
  }
}

/* Header */
.pd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--nav-h);
  padding: 0 var(--space-md);
  background: oklch(20% 0.032 52 / 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.pd-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.pd-back:hover {
  color: var(--gold);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.pd-back:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pd-header-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 769px) {
  .pd-header-title {
    display: none;
  }
}

/* Breadcrumb */
.pd-breadcrumb {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: var(--space-sm) var(--space-md) 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.pd-breadcrumb a {
  color: var(--gold-soft);
  text-decoration: none;
}

.pd-breadcrumb a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.pd-breadcrumb__sep {
  color: var(--text-muted);
  opacity: 0.7;
}

.pd-breadcrumb__muted {
  color: var(--text-muted);
}

.pd-breadcrumb__current {
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 769px) {
  .pd-breadcrumb {
    display: flex;
  }
}

.pd-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.pd-cart-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pd-cart-count {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  color: oklch(96% 0.02 85);
  background: var(--danger);
  border-radius: var(--radius-full);
}

.pd-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--text-primary);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.pd-share-btn:hover {
  color: var(--gold);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.pd-share-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pd-share-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.pd-share-strip__hint {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pd-share-strip__hint a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.pd-share-strip__hint a:hover {
  text-decoration: underline;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold);
  background: oklch(28% 0.04 52);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}

.btn-share:hover {
  background: var(--bg-hover);
  border-color: var(--gold);
}

.btn-share:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pd-share-trigger--compact {
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .pd-share-strip {
    display: none;
  }
}

/* Layout */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

@media (min-width: 769px) {
  .product-detail {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-xl);
    padding: var(--space-md) 0 var(--space-lg);
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .product-detail {
    grid-template-columns: minmax(0, 1.1fr) minmax(22rem, 26rem);
    gap: var(--space-2xl);
  }
}

/* Gallery */
.product-image-container {
  position: relative;
  background: oklch(19% 0.03 50);
  border-bottom: 1px solid var(--border);
}

.pd-gallery-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(72vw, 22rem);
  padding: var(--space-md);
  background:
    radial-gradient(ellipse 90% 70% at 50% 35%, oklch(28% 0.04 55 / 0.5), transparent 70%),
    oklch(18% 0.028 48);
}

.product-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(70vw, 24rem);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px oklch(6% 0.02 48 / 0.55);
}

.product-image--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 14rem;
  aspect-ratio: 1;
  color: var(--text-muted);
  font-size: 2.5rem;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

@media (min-width: 769px) {
  .product-image-container {
    position: sticky;
    top: calc(var(--pd-header-h) + var(--space-sm));
    align-self: start;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 36px oklch(6% 0.02 48 / 0.45);
  }

  .pd-gallery-inner {
    min-height: min(32rem, calc(100vh - var(--pd-header-h) - 4rem));
    padding: var(--space-lg);
  }

  .product-image {
    max-height: min(30rem, calc(100vh - var(--pd-header-h) - 6rem));
    object-fit: contain;
    aspect-ratio: auto;
  }
}

/* Badges */
.pd-badges {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  z-index: 2;
}

.badge {
  position: static;
  padding: 0.35rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm, 0 2px 8px oklch(8% 0.02 48 / 0.35));
}

.badge-sale {
  color: oklch(96% 0.02 85);
  background: var(--danger);
  border-color: oklch(48% 0.14 25 / 0.5);
}

.badge-installment {
  color: oklch(96% 0.02 85);
  background: var(--success);
  border-color: oklch(48% 0.1 155 / 0.45);
}

.badge-preorder {
  color: oklch(96% 0.02 85);
  background: var(--terracotta-deep);
  border-color: oklch(42% 0.12 38 / 0.55);
}

.badge-mall {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 800;
  color: oklch(96% 0.02 85);
  background: oklch(48% 0.16 25);
  border: 1px solid oklch(55% 0.14 25 / 0.5);
  border-radius: var(--radius-sm);
}

.pd-badges .badge-ritual-pd {
  position: static;
}

.badge-ritual-pd {
  padding: 0.4rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: oklch(18% 0.03 48);
  background: var(--gold);
  border: 1px solid oklch(78% 0.12 75 / 0.6);
  border-radius: var(--radius-sm);
}

.product-detail.is-ritual .product-image-container.ritual-img-wrap {
  border-color: oklch(72% 0.14 75 / 0.45);
  box-shadow: 0 0 0 1px oklch(72% 0.14 75 / 0.2);
}

/* Info column */
.product-info {
  padding: var(--space-lg) var(--space-md);
}

@media (min-width: 769px) {
  .product-info {
    padding: 0;
  }
}

.product-title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

@media (min-width: 769px) {
  .product-title {
    margin-bottom: var(--space-lg);
    font-size: 2rem;
    line-height: 1.2;
  }
}

.pd-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem var(--space-md);
  margin: calc(var(--space-sm) * -1) 0 var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.pd-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  color: inherit;
  text-decoration: none;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.pd-rating:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.pd-rating:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pd-rating__stars {
  color: var(--warning);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.pd-rating__text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.pd-stock i {
  font-size: 0.45rem;
}

.pd-stock--in {
  color: var(--success);
}

.pd-stock--out {
  color: var(--danger);
}

.product-price {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 2.375rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.product-price.sale {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
}

.original-price {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-percent {
  padding: 0.2rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: oklch(96% 0.02 85);
  background: var(--danger);
  border-radius: var(--radius-sm);
}

.product-detail.is-ritual .product-price.ritual-price {
  color: var(--gold-soft);
}

.ritual-notice {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  background: oklch(72% 0.14 75 / 0.08);
  border: 1px solid oklch(72% 0.14 75 / 0.25);
  border-radius: var(--radius-md);
}

.ritual-notice i {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--gold);
}

.pd-block {
  margin: var(--space-xl) 0 var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.pd-block__title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pd-desc-body {
  position: relative;
  max-height: 9rem;
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  transition: max-height var(--dur-med) var(--ease-out);
}

.pd-desc-body.is-expanded {
  max-height: none;
}

.pd-desc-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg-base));
}

.pd-desc-fade.is-hidden {
  display: none;
}

.pd-desc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  min-width: 8rem;
  margin-top: var(--space-md);
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-soft);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.pd-desc-toggle:hover {
  color: var(--gold);
  border-color: var(--border-strong);
  background: var(--bg-muted);
}

.pd-desc-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.legal-disclaimer {
  margin: var(--space-lg) 0 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: none;
  border: none;
}

.legal-disclaimer i {
  margin-right: 0.25rem;
  opacity: 0.75;
}

.legal-disclaimer a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pd-specs {
  display: grid;
  gap: 0;
  margin: var(--space-md) 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pd-specs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.75rem var(--space-md);
  background: var(--bg-raised);
}

.pd-specs__row + .pd-specs__row {
  border-top: 1px solid var(--border);
}

.pd-specs__row dt {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pd-specs__row dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.pd-specs__ok {
  color: var(--success);
}

.pd-specs__out {
  color: var(--danger);
}

/* Seller */
.seller-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'avatar body'
    'actions actions';
  gap: var(--space-sm) var(--space-md);
  align-items: center;
  padding: var(--space-md);
  margin: var(--space-xl) 0 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.seller-card__avatar {
  grid-area: avatar;
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-full);
}

.seller-card__body {
  grid-area: body;
}

.seller-card__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  width: 100%;
}

.seller-card__actions .btn,
.seller-card__actions form {
  flex: 1 1 calc(50% - var(--space-sm));
  min-width: 7rem;
}

.seller-card__actions form {
  margin: 0;
}

.seller-card__actions .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .seller-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .seller-card__actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    width: auto;
  }

  .seller-card__actions .btn,
  .seller-card__actions form {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
  }
}

.seller-card__body {
  flex: 1;
  min-width: 0;
}

.seller-card__name {
  margin-bottom: 0.15rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.seller-card__badge {
  font-size: 0.6875rem;
  font-weight: 700;
}

.seller-card__badge--ok {
  color: var(--success);
}

.seller-card__badge--mall {
  color: oklch(58% 0.16 25);
}

.seller-card__badge--warn {
  color: var(--danger);
}

/* Purchase panel — static on desktop (no sticky follow) */
.pd-purchase-panel {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

@media (min-width: 769px) {
  .pd-purchase-panel {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    border-color: var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px oklch(8% 0.02 48 / 0.25);
  }

  .pd-purchase-panel .quantity-selector {
    margin-bottom: var(--space-md);
  }

  .pd-purchase-panel .action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pd-purchase-panel .action-buttons .btn {
    flex: 1 1 calc(50% - var(--space-sm));
    min-width: 9rem;
    min-height: 2.875rem;
    font-size: 0.9375rem;
  }

  .pd-purchase-panel .action-buttons .btn:only-child {
    flex: 1 1 100%;
  }
}

.pd-purchase-panel .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Installment */
.installment-info {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: oklch(62% 0.12 155 / 0.08);
  border: 1px solid oklch(62% 0.12 155 / 0.25);
  border-radius: var(--radius-md);
}

.installment-info--compact {
  margin-top: calc(var(--space-sm) * -1);
}

.installment-info__head {
  margin-bottom: var(--space-sm);
}

.installment-info h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--success);
}

.installment-info__grid {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.installment-info__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.45rem 0;
  border-bottom: 1px solid oklch(62% 0.12 155 / 0.15);
}

.installment-info__row:last-of-type {
  border-bottom: none;
}

.installment-info__row dt {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.installment-info__row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

.installment-info__row--highlight dd {
  font-size: 1.125rem;
  color: var(--success);
}

.installment-info__note {
  margin: var(--space-sm) 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Quantity + actions */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.quantity-selector label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.quantity-btn {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold-soft);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: background var(--dur-fast);
}

.quantity-btn:hover {
  background: var(--bg-hover);
}

.quantity-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.quantity-input {
  width: 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  background: transparent;
  border: none;
  pointer-events: none;
}

.action-buttons {
  display: flex;
  gap: var(--space-sm);
}

.action-buttons .btn {
  flex: 1;
  min-height: 2.75rem;
}

.btn-success {
  background: var(--terracotta);
  color: oklch(96% 0.02 85);
  border-color: oklch(42% 0.12 38);
}

.btn-success:hover {
  background: var(--terracotta-deep);
}

.btn-outline {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--gold-soft);
  color: var(--gold);
}

.btn-ritual {
  background: var(--gold);
  color: oklch(18% 0.03 48);
  border: 1px solid oklch(78% 0.12 75 / 0.5);
  font-weight: 700;
}

.btn-ritual:hover {
  background: var(--gold-soft);
}

.btn-preorder-lg {
  background: var(--warning);
  color: oklch(22% 0.04 48);
  border: 1px solid oklch(65% 0.12 68 / 0.5);
  font-weight: 800;
}

.out-of-stock {
  padding: var(--space-md);
  font-weight: 600;
  text-align: center;
  color: var(--danger);
  background: oklch(58% 0.16 25 / 0.1);
  border: 1px solid oklch(58% 0.16 25 / 0.3);
  border-radius: var(--radius-md);
}

/* Reviews */
.reviews-section {
  margin: var(--space-lg) var(--space-md) var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

@media (min-width: 769px) {
  .reviews-section {
    margin: var(--space-xl) 0 var(--space-2xl);
    padding: var(--space-xl);
  }
}

#reviews-heading {
  scroll-margin-top: calc(var(--pd-header-h) + var(--space-md));
}

.reviews-section h3,
#reviews-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.reviews-section__stat {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.review-item {
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.review-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.review-item__head {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.review-item__avatar {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.review-item__meta {
  flex: 1;
  min-width: 0;
}

.review-item__name {
  font-size: 0.9375rem;
  font-weight: 700;
}

.review-item__stars {
  color: var(--warning);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.review-item__date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.review-item__comment {
  padding: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.reviews-empty {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.reviews-empty i {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 2rem;
  opacity: 0.45;
}

/* Mobile action bar */
.mobile-action-bar {
  display: none;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
  background: oklch(20% 0.032 52 / 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

@media (max-width: 768px) {
  .desktop-actions,
  .pd-purchase-panel.desktop-actions {
    display: none !important;
  }

  .mobile-action-bar {
    display: flex;
    min-height: var(--pd-bar-h);
  }

  body.pd-page.store-page {
    padding-bottom: calc(var(--pd-bar-h) + env(safe-area-inset-bottom, 0px));
  }

  .product-info {
    padding-bottom: var(--space-md);
  }
}

.action-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  gap: 0.15rem;
}

.action-icon-btn i {
  font-size: 1.25rem;
  color: var(--gold-soft);
}

.action-icon-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.pd-action-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--border);
}

.mobile-action-bar .btn {
  flex: 1;
  min-height: 2.75rem;
  min-width: 2.75rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.mobile-action-bar .btn:disabled {
  opacity: 0.65;
}

.action-icon-btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* Bottom nav */
.pd-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--dock-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: oklch(20% 0.032 52 / 0.96);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .pd-bottom-nav {
    display: none;
  }
}

.pd-bottom-nav .nav-item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.pd-bottom-nav .nav-item.active {
  color: var(--gold);
}

.pd-bottom-nav .nav-icon {
  font-size: 1.125rem;
}

.pd-bottom-nav .nav-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Toast */
.pd-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  width: min(20rem, 85vw);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  color: oklch(96% 0.02 85);
  text-align: center;
  background: oklch(42% 0.12 155 / 0.95);
  border: 1px solid oklch(52% 0.1 155 / 0.5);
  border-radius: var(--radius-md);
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-lg, 0 14px 36px oklch(6% 0.02 48 / 0.5));
  animation: pd-toast-in 0.28s ease-out;
}

.pd-toast--share {
  background: oklch(24% 0.04 52 / 0.96);
  border-color: var(--border-strong);
}

.pd-toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.125rem;
  color: var(--gold);
  background: oklch(32% 0.05 52);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
}

.pd-toast__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pd-toast__sub {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-secondary);
}

@keyframes pd-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-desc-body,
  .quantity-btn,
  .btn,
  .pd-toast {
    animation: none;
    transition: none;
  }
}
