/* Página de produto – HTML/CSS idêntico ao Famosinhos (do paste) */

.product-detail-page {
  padding-top: 56px;
  padding-bottom: 140px;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* —— Galeria —— */
.product-gallery-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #fafafa;
  overflow: hidden;
}

.product-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-out;
}

.product-gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.product-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-slide--video .product-gallery-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.product-gallery-counter {
  display: none;
}

/* Dot indicators */
.product-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.product-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, width 0.2s, border-radius 0.2s;
  flex-shrink: 0;
}

.product-gallery-dot.active {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}

/* —— Wrapper do bloco de preço (padding 0 16px 16px) —— */
.product-price-block {
  padding: 0 16px 16px;
}

/* —— Barra de oferta full-bleed (gradiente igual ao Famosinhos) —— */
.product-promo-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  background: linear-gradient(to right, rgb(251, 84, 52), rgb(251, 56, 74));
  padding: 5px 16px;
  margin-left: -16px;
  margin-right: -16px;
  position: relative;
  overflow: hidden;
}

.product-promo-bar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0%;
  position: relative;
  z-index: 1;
}

.product-promo-bar-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.product-promo-bar .product-badge-percent {
  background: white;
  color: rgb(255, 43, 86);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
}

.product-promo-bar .product-price-current {
  font-size: 28px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.product-promo-bar .product-price-current .currency {
  font-size: 20px;
}

.product-promo-bar .product-price-old {
  font-size: 16px;
  color: white;
  text-decoration: line-through;
  margin-left: 0;
}

.product-promo-bar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  position: absolute;
  bottom: 5px;
  right: 16px;
  z-index: 1;
}

.product-promo-flash-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-promo-flash-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: white;
}

.product-promo-flash-countdown .time {
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Badge -X% (quando não está dentro da barra) e 88% OFF */
.product-badge-percent {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #ff2b56;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
}

.product-price-current {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.02em;
}

.product-price-current .currency {
  font-size: 18px;
  font-weight: 600;
  margin-right: 2px;
}

.product-price-old {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  margin-left: auto;
}

/* Badge 88% OFF (product-badge-discount do Famosinhos) */
.product-badge-discount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ff2b56;
  background: rgb(255, 227, 234);
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 10px;
}

.product-badge-discount svg {
  width: 14px;
  height: 14px;
}

/* —— Info: título, rating, vendidos —— */
.product-info-section {
  padding: 0 16px 0;
}

.product-detail-name {
  font-size: 18px;
  font-weight: 700;
  color: rgb(22, 22, 22);
  margin-bottom: 8px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgb(240, 240, 240);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-rating-stars {
  color: rgb(251, 186, 8);
  font-size: 14px;
}

.product-rating-value {
  font-size: 14px;
  font-weight: 600;
  color: rgb(34, 34, 34);
}

.product-rating-count {
  font-size: 13px;
  color: rgb(117, 117, 117);
}

.product-meta-divider {
  height: 14px;
  width: 1px;
  background: rgb(224, 224, 224);
  flex-shrink: 0;
}

.product-vendas {
  font-size: 13px;
  color: rgb(117, 117, 117);
}

/* —— Frete —— */
.product-frete-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgb(240, 240, 240);
}

.product-frete-icon {
  flex-shrink: 0;
  font-size: 20px;
  color: #00a650;
}

.product-frete-content {
  flex: 1;
}

.product-frete-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.product-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: #00a650;
  background: rgba(0, 166, 80, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.product-frete-text {
  font-size: 12px;
  color: rgb(117, 117, 117);
}

.product-frete-sub {
  font-size: 12px;
  color: rgb(117, 117, 117);
}

/* Taxa de envio riscada (frete grátis) – garante line-through visível */
.product-frete-taxa-riscada {
  text-decoration: line-through !important;
}

/* —— Proteção do cliente —— */
.product-trust-section {
  padding: 12px 16px;
  margin-left: -16px;
  margin-right: -16px;
  margin-bottom: 16px;
  border-bottom: 8px solid rgb(245, 245, 245);
  background: #fcf3e9;
}

.product-trust-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: hsl(30, 44%, 37%);
  margin-bottom: 8px;
}

.product-trust-title svg {
  flex-shrink: 0;
}

.product-trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
}

.product-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: hsl(30, 44%, 37%);
}

.product-trust-item .trust-check {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

/* —— Compact variant row —— */
.variant-compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  background: #fff;
  margin-bottom: 0;
}

.vcr-icon {
  color: rgb(34, 34, 34);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.vcr-thumbs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.vcr-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 4px;
  border: 1px solid rgb(224, 224, 224);
  overflow: hidden;
  flex-shrink: 0;
}

.vcr-thumb img {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: cover;
  display: block;
}

.vcr-label {
  font-size: 12px;
  color: rgb(156, 163, 175);
  white-space: nowrap;
  flex-shrink: 0;
}

.vcr-chevron {
  color: rgb(156, 163, 175);
  flex-shrink: 0;
}

/* —— Descrição —— */
.product-desc-section {
  margin: 0 -16px 0;
  padding: 20px 16px;
  border-top: 8px solid rgb(245, 245, 245);
}

.product-desc-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: rgb(22, 22, 22);
}

.product-desc-body {
  font-size: 14px;
  line-height: 1.6;
  color: rgb(85, 85, 85);
  white-space: pre-wrap;
}

.product-desc-body b {
  font-weight: 700;
  color: #222;
}

/* —— Avaliações (resumo) —— */
.product-reviews-section {
  margin: 20px -16px;
  padding: 20px 16px 0;
  border-top: 8px solid rgb(245, 245, 245);
}

.product-reviews-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  padding: 0 0 16px;
  color: rgb(22, 22, 22);
}

.product-reviews-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.product-reviews-rating {
  font-size: 14px;
  font-weight: 700;
  color: rgb(34, 34, 34);
}

.product-reviews-rating-slash {
  font-size: 14px;
  font-weight: 400;
  color: rgb(102, 102, 102);
}

.product-reviews-stars {
  display: flex;
  gap: 2px;
  align-items: center;
  color: rgb(251, 186, 8);
  font-size: 16px;
}

.product-reviews-more-btn {
  width: 100%;
  padding: 13px;
  margin-top: 16px;
  background: white;
  border: 1.5px solid rgb(224, 224, 224);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgb(34, 34, 34);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.product-reviews-more-btn:active {
  background: #f5f5f5;
  border-color: #bbb;
}

/* —— Cards de avaliação (estilo Famosinhos) —— */
.product-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  padding-bottom: 16px;
  border-bottom: 1px solid rgb(240, 240, 240);
}

.review-card:last-of-type {
  border-bottom: 0;
}

.review-header {
  margin-bottom: 8px;
}

.review-user {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgb(251, 186, 8);
  color: #222;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.review-card:nth-child(1) .review-avatar { background: #fbbf24; color: #222; }
.review-card:nth-child(2) .review-avatar { background: #fe2c55; color: #fff; }
.review-card:nth-child(3) .review-avatar { background: #00a650; color: #fff; }
.review-card:nth-child(4) .review-avatar { background: #1d9bf0; color: #fff; }
.review-card:nth-child(5) .review-avatar { background: #8b5cf6; color: #fff; }

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

.review-user-name {
  font-size: 13px;
  font-weight: 700;
  color: rgb(22, 22, 22);
}

.review-stars {
  display: flex;
  gap: 2px;
  align-items: center;
  margin-top: 4px;
  color: rgb(251, 186, 8);
  font-size: 14px;
}

.review-date {
  font-size: 12px;
  color: rgb(102, 102, 102);
  margin-top: 4px;
}

.review-comment {
  font-size: 13px;
  line-height: 1.6;
  color: rgb(51, 51, 51);
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.review-photo {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgb(208, 208, 208) transparent;
  padding: 8px 0 4px;
  margin-top: 8px;
}

.review-photo img,
.review-photo .review-photo-item {
  width: 100px;
  height: 100px;
  min-width: 100px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
}

/* —— Você também pode gostar —— */
.product-related-section {
  background: rgb(245, 245, 245);
  margin-top: 20px;
  margin-left: -16px;
  margin-right: -16px;
  padding: 20px 16px 80px;
  border-top: 8px solid rgb(245, 245, 245);
}

.product-related-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: rgb(22, 22, 22);
}

.product-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.product-related-card {
  background: white;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-related-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-related-card-body {
  padding: 8px;
}

.product-related-card .product-name {
  font-size: 13px;
  font-weight: 500;
  color: #222;
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-related-card .product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.product-related-card .current-price {
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.product-related-card .current-price .currency {
  font-size: 12px;
  font-weight: 600;
}

.product-related-card .old-price {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.product-related-card .product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
}

.product-related-card .product-badge-discount {
  margin-bottom: 0;
  font-size: 11px;
  padding: 0 4px;
}

.product-related-card .product-badge {
  font-size: 11px;
  padding: 1px 4px;
}

.product-related-card .product-sales {
  font-size: 11px;
  color: #666;
}

/* —— Ações (botões) —— */
.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 0 16px 16px;
}

.product-actions .add-to-cart-btn {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: #222;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.product-actions .add-to-cart-btn:active {
  background: #f5f5f5;
}

.product-actions .buy-btn {
  flex: 1;
  height: 52px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(to right, #fe2c55, #ff5e3a);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

.product-actions .buy-btn:active {
  opacity: 0.9;
}

/* —— Barra fixa inferior —— */
.product-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.product-sticky-price {
  font-size: 20px;
  font-weight: 700;
  color: #222;
}

.product-sticky-price .currency {
  font-size: 14px;
  font-weight: 600;
}

.product-sticky-btn {
  flex: 1;
  padding: 14px 20px;
  background: linear-gradient(to right, #fe2c55, #ff5e3a);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.01em;
}

.product-sticky-btn:active {
  opacity: 0.9;
}

/* ===== Bottom sheet de variantes (TikTok Shop style) ===== */
.vs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.vs-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.vs-sheet {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 16px 16px 0 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.vs-overlay.open .vs-sheet {
  transform: translateY(0);
}

/* Cabeçalho */
.vs-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 48px 16px 16px;
  flex-shrink: 0;
  position: relative;
}
.vs-header-img {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f3f3;
  border: 1px solid #f0f0f0;
}
.vs-header-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vs-header-info { flex: 1; min-width: 0; }
.vs-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: #fe2c55;
  margin-bottom: 4px;
}
.vs-price-currency { font-size: 20px; font-weight: 700; }
.vs-price-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.vs-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #fff0f5;
  color: #fe2c55;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #ffecef;
  border-radius: 4px;
}
.vs-price-old {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
  margin-top: 2px;
}
.vs-close {
  position: absolute;
  top: 16px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #161823;
  line-height: 1;
  font-size: 22px;
}

/* Corpo com scroll */
.vs-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.vs-group { margin-bottom: 20px; }
.vs-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin: 0 0 10px;
}

/* Grade 3 colunas com imagem */
.vs-img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.vs-img-opt {
  display: flex;
  flex-direction: column;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vs-img-opt.selected {
  border-color: #fe2c55;
  box-shadow: 0 0 0 1px #fe2c55;
}
.vs-img-opt-thumb {
  aspect-ratio: 1;
  width: 100%;
  background: #f9f9f9;
  overflow: hidden;
  display: block;
}
.vs-img-opt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vs-img-opt-label {
  padding: 6px 4px;
  font-size: 11px;
  text-align: center;
  color: #555;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  display: block;
}
.vs-img-opt.selected .vs-img-opt-label {
  font-weight: 700;
  color: #111;
}

/* Botões de texto (tamanho etc.) */
.vs-text-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vs-text-opt {
  min-width: 56px;
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: #161823;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.vs-text-opt.selected {
  border-color: #fe2c55;
  color: #fe2c55;
  font-weight: 700;
}

/* Quantidade */
.vs-qty-section {
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.vs-qty-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 0;
}
.vs-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.vs-qty-btn {
  width: 44px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  font-size: 20px;
  line-height: 1;
  transition: background 0.15s;
}
.vs-qty-btn:hover { background: #f5f5f5; }
.vs-qty-btn:disabled { opacity: 0.3; cursor: default; }
.vs-qty-val {
  width: 44px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  border-left: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
}

/* Rodapé */
.vs-footer {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: max(12px, calc(12px + env(safe-area-inset-bottom, 0px)));
  flex-shrink: 0;
  border-top: 1px solid #f0f0f0;
}
.vs-btn-cart {
  flex: 1;
  height: 48px;
  background: #f5f5f5;
  color: #161823;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.vs-btn-cart:active { background: #e5e5e5; }
.vs-btn-buy-now {
  flex: 1;
  height: 48px;
  background: #fe2c55;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.vs-btn-buy-now:active { background: #ea284e; }
