/**
 * Product detail page — premium mobile-first + desktop split
 */
.product-detail-page {
  padding-bottom: 100px;
  background: #fff;
}
.product-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #5c4a52;
  text-decoration: none;
}
.product-detail-back:hover {
  color: #e91e63;
}
.product-detail-grid {
  display: block;
}
.product-detail-gallery {
  background: linear-gradient(180deg, #fff9fc 0%, #fff 100%);
  padding: 12px 16px 20px;
}
.product-detail-gallery-main {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(26, 18, 24, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.product-detail-gallery-main::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  width: 70%;
  height: 42%;
  background: #fce4ec;
  border-radius: 8px;
  z-index: 0;
}
.product-detail-gallery-main img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-detail-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 4px 0;
  justify-content: center;
  scrollbar-width: none;
}
.product-detail-thumbs::-webkit-scrollbar {
  display: none;
}
.product-detail-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 2px solid #f0e8ec;
  border-radius: 10px;
  overflow: hidden;
  padding: 4px;
  background: #fff;
  cursor: pointer;
}
.product-detail-thumb.active {
  border-color: #e91e63;
  box-shadow: 0 0 0 1px #e91e63;
}
.product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-detail-info {
  padding: 0 16px 24px;
}
.product-detail-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e91e63;
  margin-bottom: 4px;
}
.product-detail-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #1a1218;
  margin: 0 0 8px;
}
.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5c4a52;
  margin-bottom: 14px;
}
.product-detail-rating .star {
  color: #e91e63;
}
.product-detail-rating .verified {
  color: #2e7d32;
  font-weight: 600;
  font-size: 12px;
}
.product-detail-price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.product-detail-price {
  font-size: 28px;
  font-weight: 800;
  color: #1a1218;
}
.product-detail-price-was {
  font-size: 16px;
  color: #9e8e94;
  text-decoration: line-through;
}
.product-detail-discount {
  font-size: 12px;
  font-weight: 700;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 3px 8px;
  border-radius: 6px;
}
.product-detail-coupon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.product-detail-short {
  font-size: 14px;
  line-height: 1.6;
  color: #5c4a52;
  margin-bottom: 18px;
}
.product-detail-variants label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1218;
}
.product-detail-variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.product-detail-variant-pills .variant-pill {
  padding: 8px 14px;
  border: 1.5px solid #f0e8ec;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #1a1218;
}
.product-detail-variant-pills .variant-pill.active {
  border-color: #e91e63;
  background: #fff5f8;
  color: #c2185b;
}
.product-detail-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.product-detail-qty-row label {
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}
.product-detail-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.product-detail-trust span {
  font-size: 10px;
  text-align: center;
  color: #5c4a52;
  padding: 8px 4px;
  background: #faf8f9;
  border-radius: 8px;
  line-height: 1.3;
}
.product-detail-trust strong {
  display: block;
  font-size: 11px;
  color: #1a1218;
  margin-bottom: 2px;
}
.product-detail-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #f0e8ec;
  margin: 0 16px 16px;
  padding-bottom: 0;
  scrollbar-width: none;
}
.product-detail-tabs .product-tab {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 700;
  color: #9e8e94;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.product-detail-tabs .product-tab.active {
  color: #e91e63;
  border-bottom-color: #e91e63;
}
.product-detail-panels {
  padding: 0 16px 24px;
}
.product-detail-panels .tab-panel {
  display: none;
  font-size: 14px;
  line-height: 1.7;
  color: #5c4a52;
}
.product-detail-panels .tab-panel.active {
  display: block;
}
.product-detail-review {
  background: #faf8f9;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid #f0e8ec;
}
.product-detail-related {
  padding: 20px 16px;
  background: linear-gradient(180deg, #fff9fc, #fff);
}
.product-detail-related .section-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 12px;
}
.product-detail-related .home-products-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.product-detail-related .home-products-grid::-webkit-scrollbar {
  display: none;
}
.product-detail-related .product-card-premium {
  flex: 0 0 42%;
  min-width: 140px;
  max-width: 168px;
}
.product-detail-sticky {
  position: fixed;
  bottom: calc(var(--nav-height, 56px) + var(--safe-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid #f0e8ec;
  box-shadow: 0 -4px 20px rgba(26, 18, 24, 0.08);
}
.product-detail-sticky .btn-wish {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #f0e8ec;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9e8e94;
}
.product-detail-sticky .btn-wish.active {
  color: #e91e63;
  border-color: #f8bbd0;
}
.product-detail-sticky .btn-add-bag {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e91e63, #ff4081);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .product-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
  }
  .product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 20px 24px 0;
  }
  .product-detail-gallery {
    padding: 0;
    position: sticky;
    top: 120px;
  }
  .product-detail-gallery-main {
    max-width: none;
  }
  .product-detail-info {
    padding: 0;
  }
  .product-detail-title {
    font-size: 28px;
  }
  .product-detail-sticky {
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 20px 0 0;
    margin-top: 8px;
  }
  .product-detail-sticky .btn-add-bag {
    height: 52px;
    font-size: 15px;
  }
  .product-detail-related .home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }
  .product-detail-related .product-card-premium {
    flex: unset;
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

/* v2 fixes — breadcrumb, width, related row, dual CTA */
.product-breadcrumb {
  flex-wrap: wrap;
  row-gap: 4px;
  max-width: 100%;
  box-sizing: border-box;
  font-size: clamp(10px, 2.8vw, 12px);
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}
.product-breadcrumb a { word-break: break-word; }
.product-detail-page {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}
@media (min-width: 1024px) {
  .product-detail-page {
    max-width: min(1400px, 100%);
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
  }
}
.product-detail-related {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}
.product-detail-related .home-products-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.product-detail-related .store-product-card {
  flex: 0 0 min(46vw, 200px) !important;
  width: min(46vw, 200px) !important;
  min-width: min(46vw, 200px) !important;
  max-width: min(46vw, 200px) !important;
  scroll-snap-align: start;
}
@media (min-width: 1024px) {
  .product-detail-related .home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .product-detail-related .store-product-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: unset !important;
  }
}
.product-detail-sticky .btn-buy-now-bar {
  flex: 1 1 100px;
  min-width: 0;
  height: 48px;
  border: 2px solid #e91e63;
  border-radius: 12px;
  background: #fff;
  color: #c2185b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.product-detail-sticky .btn-add-bag {
  flex: 1 1 120px;
  min-width: 0;
  font-size: 12px;
  padding: 0 8px;
}
@media (min-width: 1024px) {
  .product-detail-sticky .btn-buy-now-bar { height: 52px; font-size: 14px; }
  .product-detail-sticky .btn-add-bag { font-size: 15px; }
}
/* You May Also Like — clearer section + cards */
.product-detail-related {
  border-radius: 16px 16px 0 0;
  margin-top: 10px;
  border: 1px solid rgba(233, 30, 99, 0.1);
  box-shadow: 0 -6px 28px rgba(26, 18, 24, 0.06);
}
.product-detail-related .section-title {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.12), rgba(156, 39, 176, 0.08));
  color: #880e4f;
  margin-bottom: 14px;
}
.product-detail-related .store-product-card {
  border-radius: 0 !important;
  overflow: visible !important;
  box-shadow: 0 2px 14px rgba(26, 18, 24, 0.07) !important;
  border: 1px solid rgba(233, 30, 99, 0.1) !important;
}
.product-detail-related .store-card-title {
  font-size: 13px !important;
}
.product-detail-related .store-price {
  font-size: 15px !important;
}
/* product-detail-related-scroll — text not clipped */
.product-detail-related .home-products-grid {
  scroll-snap-type: none !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
.product-detail-related .store-card-info {
  padding: 8px 8px 10px !important;
}
.product-detail-related .store-card-title {
  -webkit-line-clamp: 3 !important;
  min-height: 0 !important;
}
/* Description gallery + fullscreen lightbox */
.product-desc-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}
@media (min-width: 640px) {
  .product-desc-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}
.product-desc-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(233, 30, 99, 0.1);
  box-shadow: 0 4px 16px rgba(26, 18, 24, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-desc-gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.15);
}
@media (max-width: 767px) {
  .product-desc-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .product-desc-gallery img {
    aspect-ratio: 16/10;
    border-radius: 16px;
  }
}
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 8, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.img-lightbox.open {
  opacity: 1;
  visibility: visible;
}
.img-lightbox img {
  max-width: min(100%, 920px);
  max-height: min(88vh, 88dvh);
  object-fit: contain;
  border-radius: 8px;
}
.img-lightbox-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
/* Description: text first, images in row below */
#tab-description .product-detail-body {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.65;
  color: #4a3d44;
}
#tab-description .product-desc-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#tab-description .product-desc-gallery::-webkit-scrollbar {
  display: none;
}
.product-desc-gallery-item {
  flex: 0 0 42%;
  max-width: 200px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 4px 16px rgba(26, 18, 24, 0.08);
}
.product-desc-gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}
@media (min-width: 640px) {
  .product-desc-gallery-item {
    flex: 0 0 28%;
    max-width: 220px;
  }
}
/* Related products — one action row only */
.product-detail-related .store-card-actions-premium {
  padding: 0 8px 8px !important;
}
.product-detail-related .store-card-actions-premium .act-buy {
  display: none !important;
}
.product-detail-related .home-products-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
  padding: 0 12px 16px !important;
}
@media (min-width: 768px) {
  .product-detail-related .home-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    max-width: 1200px;
    margin: 0 auto;
  }
}
