/* Product detail page core layout */
.pdp {
  margin: 1.5rem auto 3rem;
  padding: 1.5rem 1rem 2rem;
  max-width: min(1200px, calc(100% - 2rem));
  background: rgba(15, 17, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: var(--bs-body-color, #f8f9fa);
}

@media (min-width: 768px) {
  .pdp {
    padding: 2rem clamp(1.5rem, 4vw, 3rem) 3rem;
  }
}

@media (max-width: 991.98px) {
  .pdp {
    padding-bottom: 6rem;
  }
}

.pdp__header {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pdp__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.8rem, 2.3vw, 2.6rem);
  line-height: 1.2;
}

.pdp__wrap {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 992px) {
  .pdp__wrap {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* Gallery */
.pdp__gallery .gallery__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  overflow: hidden;
}

.pdp__gallery .gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pdp__gallery .gallery__video,
.pdp__gallery .gallery__embed,
.pdp__gallery .ratio {
  width: 100%;
  height: 100%;
}

.pdp__gallery .gallery__video video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  object-fit: cover;
  object-position: center;
}

.pdp__gallery .gallery__embed iframe,
.pdp__gallery iframe.gallery__embed {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.pdp__gallery .gallery__stage .ratio::before {
  padding-top: 0 !important;
}

.pdp__gallery .gallery__stage .ratio > * {
  position: static !important;
  width: 100%;
  height: 100%;
}

.pdp__gallery .gallery__placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 12px, rgba(255, 255, 255, 0.02) 12px, rgba(255, 255, 255, 0.02) 24px);
}

.pdp__gallery .gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.pdp__gallery .thumb {
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
  aspect-ratio: 1 / 1;
}

.pdp__gallery .thumb.is-active {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 0;
  transform: translateY(-2px);
}

.pdp__gallery .thumb img,
.pdp__gallery .thumb video,
.pdp__gallery .thumb__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pdp__gallery .thumb img {
  filter: saturate(0.9);
}

.pdp__gallery .thumb--video {
  position: relative;
  color: inherit;
}

.pdp__gallery .thumb__badge {
  position: absolute;
  inset: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.pdp__gallery .thumb__placeholder {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pdp__gallery .thumb__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.pdp__gallery .thumb__play-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.pdp__gallery .thumb:focus-visible,
.pdp__gallery .thumb:hover {
  outline: 0;
  transform: translateY(-2px);
}

.pdp__gallery .thumb:focus-visible img,
.pdp__gallery .thumb:hover img {
  filter: none;
}

/* Meta data */
.pdp__price {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.pdp__meta {
  padding: 0;
  margin: 1rem 0 1.25rem;
  display: grid;
  gap: 0.4rem 1.5rem;
}

main#content .pdp .pdp__meta {
  list-style: none;
}

@media (min-width: 576px) {
  .pdp__meta {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.pdp__meta-item {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.pdp__meta-label {
  font-weight: 600;
  opacity: 0.75;
}

.pdp__meta-value {
  font-weight: 500;
}

.product-badges {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-badge--ghost {
  background: transparent;
}

/* Stock badge */
.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stock-badge--in {
  color: #19eab5;
  border-color: rgba(25, 234, 181, 0.35);
  background: rgba(25, 234, 181, 0.16);
}

.stock-badge--low {
  color: #f9bf3b;
  border-color: rgba(249, 191, 59, 0.35);
  background: rgba(249, 191, 59, 0.16);
}

.stock-badge--out {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.4);
  background: rgba(255, 107, 129, 0.16);
}

.stock-badge--mto {
  color: #a98dff;
  border-color: rgba(169, 141, 255, 0.4);
  background: rgba(169, 141, 255, 0.16);
}

/* Add to cart */
.product-add-to-cart {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.product-add-to-cart__label {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.product-add-to-cart__qty-controls {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.product-add-to-cart__qty-btn {
  border: 0;
  background: transparent;
  min-width: 44px;
  font-size: 1.4rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.product-add-to-cart__qty-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.product-add-to-cart__qty-input {
  width: 72px;
  text-align: center;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
}

.product-add-to-cart__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-add-to-cart__actions .btn {
  flex: 1 1 220px;
  min-height: 48px;
}

/* Side info cards */
.product-side-card {
  margin-top: 1.5rem;
  padding: 1.2rem 1.4rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-side-card__title {
  margin: 0 0 0.9rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.product-side-card__list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.product-side-card__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 0.9rem;
  align-items: start;
  font-size: 0.95rem;
}

.product-side-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.product-side-card__label {
  font-weight: 600;
}

.product-side-card__value {
  opacity: 0.85;
}

.product-shipping-estimator {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.product-shipping-estimator__fields {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-shipping-estimator__fields input {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  padding: 0.45rem 0.75rem;
  color: inherit;
}

.product-shipping-estimator__fields select {
  flex: 1 1 160px;
  min-width: 140px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  padding: 0.45rem 0.75rem;
  color: inherit;
}

.product-shipping-estimator__status {
  min-height: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Tabs */
.product-tabs {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.product-tabs__list {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.product-tabs__tab {
  border: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  opacity: 0.7;
  cursor: pointer;
}

.product-tabs__tab[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.product-tabs__panel {
  padding: 1.25rem 0;
}

.product-tabs__panel.is-hidden,
.product-tabs__panel[hidden] {
  display: none;
}

/* Rating stars */
.stars {
  display: inline-flex;
  gap: 0.25rem;
}

.star {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=\"0 0 24 24\"><path d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.62L12 2 9.19 8.62 2 9.24l5.46 4.73L5.82 21z\"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=\"0 0 24 24\"><path d=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.62L12 2 9.19 8.62 2 9.24l5.46 4.73L5.82 21z\"/></svg>') center/contain no-repeat;
  opacity: 0.35;
}

.star.is-full,
.star.is-half {
  opacity: 1;
}

.star.is-half {
  background: linear-gradient(90deg, currentColor 50%, rgba(255, 255, 255, 0.3) 50%);
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 1.5rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.95rem;
  opacity: 0.9;
}

.breadcrumbs__item::after {
  content: '>';
  opacity: 0.5;
  margin-left: 0.4rem;
}

.breadcrumbs__item:last-child::after {
  content: none;
}

.breadcrumbs__link {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs__link:hover,
.breadcrumbs__link:focus-visible {
  text-decoration: underline;
}

.breadcrumbs__current {
  font-weight: 600;
}

/* Sticky CTA */
.pdp-sticky {
  position: sticky;
  bottom: 0;
  inset-inline: 0;
  margin-top: 1.5rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(15, 17, 25, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pdp-sticky[hidden] {
  display: none !important;
}

.pdp-sticky__price {
  font-weight: 700;
  font-size: 1.2rem;
}

.pdp-sticky form {
  display: flex;
  gap: 0.75rem;
}

.pdp-sticky .btn {
  min-width: 160px;
}

@media (min-width: 992px) {
  .pdp-sticky {
    display: none !important;
  }
}

/* Utility */
.text-muted-soft {
  opacity: 0.8;
}
