.product-page__intro {
  padding-top: calc(var(--header-height) + var(--space-6));
}

.product-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.product-page__share {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-icon);
  margin-top: 0.35em;
}
.product-page__share:hover {
  color: var(--color-brand-hover);
  border-color: var(--color-border-strong);
}

.product-page__hero {
  margin-top: var(--space-7);
}
.product-page__hero .container {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 1024px) {
  .product-page__hero .container {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
    gap: var(--space-8);
  }
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.product-gallery__main {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  overflow: hidden;
  cursor: zoom-in;
  display: none;
}
@media (min-width: 768px) {
  .product-gallery__main {
    display: block;
  }
}

.product-gallery__main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-6);
}

.product-gallery__zoom,
.product-gallery__favorite {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-icon);
  box-shadow: var(--shadow-sm);
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.product-gallery__zoom:hover,
.product-gallery__favorite:hover {
  color: var(--color-icon-hover);
  transform: scale(1.06);
}

.product-gallery__zoom {
  right: var(--space-4);
  bottom: var(--space-4);
}

.product-gallery__favorite {
  right: var(--space-4);
  top: var(--space-4);
}

.product-gallery__favorite--active {
  color: var(--color-brand);
}

.product-gallery__counter {
  display: block;
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
@media (min-width: 768px) {
  .product-gallery__counter {
    display: none;
  }
}

.product-gallery__mobile-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
}
@media (min-width: 768px) {
  .product-gallery__mobile-track {
    display: none;
  }
}
.product-gallery__mobile-track::-webkit-scrollbar {
  display: none;
}

.product-gallery__mobile-slide {
  flex: 1 0 100%;
  min-width: 100%;
  scroll-snap-align: center;
  aspect-ratio: 1/1;
}

.product-gallery__mobile-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-5);
}

.product-gallery__thumbs {
  display: none;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}
@media (min-width: 768px) {
  .product-gallery__thumbs {
    display: flex;
  }
}
.product-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.product-gallery__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-subtle);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.product-gallery__thumb:hover {
  border-color: var(--color-border-strong);
}

.product-gallery__thumb--active {
  border-color: var(--color-brand);
}

.product-gallery__thumb-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-1);
}

.product-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--color-scrim-rgb), 0.85);
  padding: var(--space-5);
}

.product-lightbox {
  position: relative;
  width: min(900px, 100%);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-lightbox__image-wrap {
  width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-lightbox__image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.product-lightbox__close,
.product-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-inverse);
}
.product-lightbox__close:hover,
.product-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.product-lightbox__close {
  top: calc(-1 * var(--space-8));
  right: 0;
}
@media (min-width: 768px) {
  .product-lightbox__close {
    top: 0;
    right: calc(-1 * var(--space-9));
  }
}

.product-lightbox__nav--prev {
  left: var(--space-2);
}

.product-lightbox__nav--next {
  right: var(--space-2);
}

.product-lightbox__counter {
  position: absolute;
  bottom: calc(-1 * var(--space-7));
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
}

.purchase-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
@media (min-width: 1024px) {
  .purchase-panel {
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
  }
}

.purchase-panel__rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.purchase-panel__rating-star {
  fill: var(--color-rating);
  color: var(--color-rating);
}

.purchase-panel__rating-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.purchase-panel__rating-count {
  color: var(--color-text);
}
.purchase-panel__rating-count:hover {
  color: var(--color-brand-hover);
}

.purchase-panel__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.purchase-panel__price {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.purchase-panel__price--old {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.purchase-panel__cheaper {
  align-self: flex-start;
  font-size: var(--font-size-xs);
  color: var(--color-text);
  text-decoration: underline;
  margin-top: calc(-1 * var(--space-2));
}
.purchase-panel__cheaper:hover {
  color: var(--color-brand-hover);
}

.purchase-panel__availability {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.purchase-panel__availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.purchase-panel__availability-note {
  color: var(--color-text);
}

.purchase-panel__specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-3);
  border-block: 1px solid var(--color-border);
}

.purchase-panel__specs-label {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.purchase-panel__specs-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  text-align: right;
}

.purchase-panel__buy-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-3);
}

.purchase-panel__qty {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-inline: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.purchase-panel__qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--color-text);
}
.purchase-panel__qty-btn:hover {
  color: var(--color-brand-hover);
}

.purchase-panel__qty-value {
  min-width: 1.2em;
  text-align: center;
  font-weight: var(--font-weight-semibold);
}

.purchase-panel__in-cart {
  flex: 1;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-brand-soft);
  color: var(--color-brand-hover);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
}
.purchase-panel__in-cart:not([hidden]) {
  display: inline-flex;
}

.purchase-panel__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.purchase-panel__actions .button--ghost {
  padding-inline: 1.6em;
  border: 1px solid var(--color-border);
}

.purchase-panel__delivery {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}
.purchase-panel__delivery:hover {
  color: var(--color-brand-hover);
}

.purchase-panel__trust-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.purchase-panel__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text);
}

.product-tabs {
  margin-top: var(--space-8);
}

.product-tabs__nav-wrap {
  position: sticky;
  top: var(--header-height);
  z-index: 15;
  background: var(--color-bg);
}

.product-tabs__list {
  margin-bottom: 0;
}

.product-tabs__panels {
  padding-top: var(--space-6);
}

.product-tab-panel {
  padding-bottom: var(--space-4);
}

.product-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.product-section__muted {
  color: var(--color-text-muted);
}

.product-description-wrap {
  position: relative;
}

.product-description-wrap--collapsed .product-description {
  max-height: 8.5em;
  overflow: hidden;
}

.product-description-wrap--collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3em;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

.product-description__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand);
}
.product-description__toggle:hover {
  color: var(--color-brand-hover);
}

.product-description__toggle-icon {
  transition: transform var(--transition-fast);
}

.product-description__toggle--open .product-description__toggle-icon {
  transform: rotate(180deg);
}

.product-description {
  max-width: 68ch;
  color: var(--color-text);
  line-height: var(--line-height-normal);
}
.product-description p {
  margin-bottom: var(--space-4);
}

.product-description__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
  list-style: disc;
}
.product-description__list li {
  line-height: var(--line-height-normal);
}

.product-specs-grid {
  margin-top: var(--space-5);
  display: grid;
  gap: 0 var(--space-8);
}
@media (min-width: 768px) {
  .product-specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.product-specs-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.product-specs-row__label {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.product-specs-row__value {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.product-availability-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.product-availability-store__name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.product-availability-store__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}
.product-availability-store__phone:hover {
  color: var(--color-brand-hover);
}

.product-availability-store__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.product-delivery-payment {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .product-delivery-payment {
    grid-template-columns: 1fr 1fr;
  }
}

.product-delivery-payment__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.product-delivery-payment__text p {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

.product-reviews__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.product-review {
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.product-review:last-child {
  border-bottom: none;
}

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

.product-review__author {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.product-review__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.product-review__text {
  color: var(--color-text);
  line-height: var(--line-height-normal);
}

.product-question-callout {
  padding-block: var(--space-8);
  background: var(--color-bg-subtle);
}

.product-question-callout__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
}
@media (min-width: 768px) {
  .product-question-callout__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.product-question-callout__inner .heading {
  margin-bottom: var(--space-1);
}
.product-question-callout__inner p {
  color: var(--color-text);
}

.product-question-callout__icon {
  flex: 0 0 auto;
  color: var(--color-icon-strong);
}

.product-sticky-buybar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}
@media (min-width: 1024px) {
  .product-sticky-buybar {
    display: none;
  }
}

.product-sticky-buybar--visible {
  transform: translateY(0);
}

.product-sticky-buybar__price {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.product-sticky-buybar .button {
  min-width: 160px;
}

@media (prefers-reduced-motion: reduce) {
  .product-sticky-buybar {
    transition: none;
  }
}
