/* Product detail page */
.page-product .app-main {
  padding: 0 var(--space-4) calc(var(--nav-height) + 140px + var(--safe-bottom));
}

.product-detail {
  animation: page-enter var(--duration-normal) var(--ease-out);
}

/* Gallery */
.product-gallery {
  margin: 0 calc(-1 * var(--space-4)) var(--space-4);
}

.product-gallery__main {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #fff5f8 0%, #fae8ff 45%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-6);
}

.product-gallery__placeholder img,
.product-gallery__placeholder svg {
  width: 140px;
  height: auto;
  opacity: 0.85;
}

.product-gallery__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: var(--weight-bold);
  background: var(--gradient-accent);
  color: white;
  border-radius: var(--radius-full);
  z-index: 2;
}

.product-gallery__badge--featured {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.product-gallery__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
}

.product-gallery__thumbs::-webkit-scrollbar { display: none; }

.product-gallery__thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-btn);
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: border-color var(--duration-fast);
}

.product-gallery__thumb.active {
  border-color: var(--accent);
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Trust strip */
.product-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.product-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.5625rem;
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-align: center;
}

.product-trust__item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-purple);
}

/* Info */
.product-info__brand {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: var(--weight-semibold);
}

.product-info__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin: var(--space-2) 0;
  line-height: 1.3;
}

.product-info__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-3);
}

.product-info__price-block {
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(244,114,182,0.06), rgba(168,85,247,0.04));
  border: 1px solid rgba(236, 72, 153, 0.12);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-4);
}

.product-info__price {
  font-size: 1.75rem;
  font-weight: var(--weight-bold);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-info__mrp {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

.product-info__savings {
  font-size: var(--text-xs);
  color: var(--success);
  font-weight: var(--weight-semibold);
  margin-top: 4px;
}

/* Specs */
.product-specs--premium {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: var(--space-5);
}

.product-specs--premium .spec-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--bg-primary);
  box-shadow: var(--shadow-card);
}

.spec-item__icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-bottom: 2px;
}

.product-section {
  margin-bottom: var(--space-5);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.product-section--description .section-title {
  margin-bottom: var(--space-3);
}

.product-desc-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  box-sizing: border-box;
}

.product-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.product-desc--body {
  white-space: pre-wrap;
}

.product-desc strong {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.product-desc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.health-report-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.health-report-card__scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.health-report-card__scores span {
  padding: 2px 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-btn);
}

.product-inbox {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seller-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.seller-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-btn);
  background: var(--gradient-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.seller-card__label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.seller-card__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.seller-card__phone {
  font-size: var(--text-xs);
  color: var(--accent);
}

.product-order-preview {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

.product-order-preview__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding: 4px 0;
}

.product-order-preview__row--muted {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.sticky-cta--product {
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  padding: var(--space-2);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-float);
}

.sticky-cta--product .btn {
  font-size: 0.75rem;
  padding: 0.625rem 0.5rem;
}

.product-page {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.product-page__hero {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

@media (min-width: 900px) {
  .product-page__hero {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.product-page__summary {
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

.product-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  align-items: center;
}

.product-trust--inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.product-trust--inline .product-trust__item {
  font-size: var(--text-xs);
}

.device-card__thumb,
.device-card__image .device-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.device-card__thumb img,
.device-card__image .device-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-video-section { margin-top: var(--space-4); }

.product-video {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
}

.product-video__player {
  width: 100%;
  max-height: 360px;
  display: block;
  background: #000;
}

.product-video__controls {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--bg-secondary);
}

.condition-report__summary { margin-bottom: var(--space-4); }

.condition-report__group {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

.condition-report__group-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.condition-report__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-2);
}

.condition-report__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-primary);
}

.condition-report__item--ok { border-left: 3px solid #10b981; }
.condition-report__item--bad { border-left: 3px solid #f59e0b; }

.condition-report__item-status {
  font-weight: 700;
  color: var(--accent);
}

@media (min-width: 768px) {
  .product-trust { grid-template-columns: repeat(4, 1fr); }
  .product-gallery { margin-left: 0; margin-right: 0; border-radius: var(--radius-card); overflow: hidden; }
}

@media (max-width: 430px) {
  .page-product .app-main {
    padding-left: clamp(10px, 3vw, var(--space-4));
    padding-right: clamp(10px, 3vw, var(--space-4));
  }

  .product-section--description .section-title {
    font-size: 1rem;
    margin-bottom: var(--space-2);
  }

  .product-desc-card {
    padding: var(--space-3);
    border-radius: 12px;
  }

  .product-desc {
    font-size: 0.8125rem;
    line-height: 1.55;
  }
}

@media (max-width: 360px) {
  .product-desc-card {
    padding: 12px;
  }

  .product-desc {
    font-size: 0.75rem;
  }
}
