/* =============================================
   products-page.css  — v5.1
   Escopo: prefixos .produto-card-ali, .card--produto,
   .pd-, .pd-aval-, .pd-related, .skeleton-card
   Sem conflitos com outros componentes.

   v5.1 — correcções:
   - [FIX B1] .pd-loading mobile-first: 1 coluna → 2 colunas ≥640px
   - [FIX B3] Removidas duplicações que eram sobrepostas pelo CSS inline
   - [FIX] .pd-skeleton--img alinhado com .pd-gallery border-radius:20px
   - [FIX] .pd-stock__bar-fill classes de cor corrigidas (sem cascata dupla)
   - [MELHORIA] .pd-related__ver-mais com estado :disabled e spinner
   - [MELHORIA] .lp-btn definido aqui — estava só no CSS inline
============================================= */

/* ══════════════════════════════════════════
   CARD DE PRODUTO — GRID / LISTA
══════════════════════════════════════════ */

.produto-card-ali {
  background: var(--branco);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.produto-card-ali:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Overlay sutil no active — substitui ripple */
.produto-card-ali::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  border-radius: inherit;
}

.produto-card-ali:active::after {
  opacity: 1;
}

/* Imagem do card */
.produto-card-ali__img {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--azul-ultraclaro);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.produto-card-ali__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.produto-card-ali:active .produto-card-ali__img img {
  transform: scale(0.98);
}

/* Body do card */
.produto-card-ali__body {
  padding: 0.65rem 0.8rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  flex: 1;
}

.produto-card-ali__nome {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--texto);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(0.83rem * 1.38 * 2);
}

.produto-card-ali__preco {
  font-family: var(--fonte-titulo);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--azul-medio);
  margin-top: 0.2rem;
  letter-spacing: -0.02em;
}

html.dark .produto-card-ali__preco {
  color: var(--azul-claro, #60a5fa);
}

.produto-card-ali__loja {
  font-size: 0.7rem;
  color: var(--texto-suave);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.produto-card-ali__distancia {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--azul-medio);
}

.produto-card-ali__estoque {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  font-weight: 700;
  width: fit-content;
  margin-top: 0.3rem;
}

/* ── Grid responsivo ── */
.produtos-grid-ali {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (max-width: 480px) {
  .produtos-grid-ali {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .produto-card-ali__nome {
    font-size: 0.79rem;
  }
  .produto-card-ali__preco {
    font-size: 0.95rem;
  }
}
/* ════════════════════════════════════════
   FIX GLOBAL — remove o estado "pintado" que
   ficava preso após o toque. Mantém o anel
   de foco apenas para navegação por teclado.
════════════════════════════════════════ */
button,
a,
[role="button"],
[tabindex] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none;
}
/* Infinite scroll spinner */
.spinner-produtos {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
  color: var(--azul-medio);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ── Cards na home ── */
#lista-destaques {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  align-items: start;
}

@media (min-width: 480px) {
  #lista-destaques {
    gap: 1rem;
  }
}
@media (min-width: 720px) {
  #lista-destaques {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  #lista-destaques {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── card--produto (home destaques) ── */
.card--produto {
  background: var(--branco);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.card--produto:active {
  transform: scale(0.98);
}

.card--produto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  border-radius: inherit;
}
.card--produto:active::after {
  opacity: 1;
}

.card--produto .produto__foto,
.card--produto .produto__imagem {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--azul-ultraclaro);
  flex-shrink: 0;
  overflow: hidden;
}

.card--produto .produto__foto img,
.card--produto .produto__imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card--produto:hover .produto__foto img,
.card--produto:hover .produto__imagem img {
  transform: scale(0.98);
}

.card--produto .produto__imagem {
  font-size: 2.5rem;
}

.card--produto .produto__nome,
.card--produto .produto__preco,
.card--produto .produto__loja,
.card--produto .produto__distancia {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.card--produto .produto__nome {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--texto);
  line-height: 1.38;
  margin-top: 0.55rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(0.83rem * 1.38 * 2);
}

.card--produto .produto__preco {
  font-family: var(--fonte-titulo);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--azul-medio);
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

html.dark .card--produto .produto__preco {
  color: var(--azul-claro, #60a5fa);
}

.card--produto .produto__loja {
  font-size: 0.7rem;
  color: var(--texto-suave);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card--produto .produto__distancia {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--azul-medio);
  margin-top: 0.1rem;
}

.card--produto .produto__estoque {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem 0.65rem;
  margin-top: 0.3rem;
}

html.dark .card--produto {
  background: #1e293b;
  border-color: #334155;
}
html.dark .card--produto .produto__nome {
  color: #f1f5f9;
}
html.dark .produto-card-ali {
  background: #1e293b;
  border-color: #334155;
}

/* ══════════════════════════════════════════
   PÁGINA DE DETALHE DO PRODUTO (.pd-)
══════════════════════════════════════════ */

/* Layout: coluna única no mobile, 2 colunas ≥720px */
.pd-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1rem 0; /* mobile: padding reduzido */
  display: grid;
  grid-template-columns: 1fr; /* [FIX B1] mobile-first: 1 coluna */
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 720px) {
  .pd-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 1.5rem 1.5rem 0;
  }
}

.pd-col--info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Galeria / foto principal ── */
.pd-gallery {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--azul-ultraclaro);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  position: relative;
  border: 1px solid var(--azul-suave);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.25s;
  /* [FIX B1] Centrar galeria no mobile */
  margin: 0 auto;
}

@media (min-width: 720px) {
  .pd-gallery {
    margin: 0; /* no desktop alinha à esquerda na coluna */
  }
}

.pd-gallery:hover {
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.13);
}

.pd-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pd-gallery:hover img {
  transform: scale(1.04);
}

.pd-gallery__zoom-hint {
  position: absolute;
  bottom: 0.9rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--azul-medio);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.pd-gallery:hover .pd-gallery__zoom-hint {
  opacity: 1;
  transform: scale(1);
}

html.dark .pd-gallery__zoom-hint {
  background: rgba(30, 41, 59, 0.9);
  color: #93c5fd;
}

.pd-gallery--placeholder {
  cursor: default;
  font-size: 6rem;
}
.pd-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--azul-medio);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}

.pd-breadcrumb .ti {
  font-size: 0.85rem;
}

html.dark .pd-breadcrumb {
  color: #93c5fd;
}
/* ── Título ── */
.pd-title {
  font-family: var(--fonte-titulo);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
  color: var(--texto);
  line-height: 1.28;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── Bloco de preço ── */
.pd-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: -0.15rem;
}

.pd-price {
  font-family: var(--fonte-titulo);
  font-size: clamp(1.55rem, 3.6vw, 2.05rem);
  font-weight: 800;
  color: var(--azul-medio);
  letter-spacing: -0.02em;
  line-height: 1;
}

html.dark .pd-price {
  color: var(--azul-claro, #60a5fa);
}
/* ── Indicador de stock — minimalista, sem barra ── */
.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  width: fit-content;
}

.pd-stock .ti {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.pd-stock--ok {
  color: #15803d;
}
.pd-stock--low {
  color: #b45309;
}
.pd-stock--out {
  color: #b91c1c;
}

html.dark .pd-stock--ok {
  color: #86efac;
}
html.dark .pd-stock--low {
  color: #fcd34d;
}
html.dark .pd-stock--out {
  color: #fca5a5;
}
.pd-stock__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.pd-stock__header .ti {
  font-size: 1rem;
  flex-shrink: 0;
}

.pd-stock__bar {
  margin-top: 0.6rem;
  height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  overflow: hidden;
}

html.dark .pd-stock__bar {
  background: rgba(255, 255, 255, 0.1);
}

.pd-stock__bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* [FIX] Cores da barra — classe independente do pai */
.pd-bar--ok {
  background: #22c55e;
}
.pd-bar--low {
  background: #f59e0b;
}
.pd-bar--out {
  background: #ef4444;
}

html.dark .pd-bar--ok {
  background: #86efac;
}
html.dark .pd-bar--low {
  background: #fcd34d;
}
/* ── Descrição do produto ── */
.pd-desc-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pd-desc-block__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--texto-suave);
  margin: 0;
}

.pd-desc {
  font-size: 0.92rem;
  color: var(--texto);
  line-height: 1.7;
  margin: 0;
  white-space: pre-line; /* respeita os parágrafos escritos pelo vendedor */
}

/* ── Card da loja ── */
.pd-store-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--azul-ultraclaro);
  border: 1px solid var(--azul-suave);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.pd-store-card:hover {
  background: var(--azul-suave);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.pd-store-card:active {
  transform: translateY(0);
}

html.dark .pd-store-card {
  background: #172033;
  border-color: #334155;
}
html.dark .pd-store-card:hover {
  background: #1e2d45;
}

.pd-store-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--azul-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--azul-medio);
}

.pd-store-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-store-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.pd-store-card__name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-store-card__dist {
  font-size: 0.75rem;
  color: var(--azul-medio);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.pd-store-card__arrow {
  font-size: 1.1rem;
  color: var(--azul-medio);
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* ── Botões de acção principais ── */
.pd-actions {
  display: flex;
  gap: 0.75rem;
}

/* ── Acção principal — ocupa sempre a linha completa
   (ex.: Ver rota). Destaca-se sem precisar de ser "grosso" ── */
.pd-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.1s ease;
  font-family: var(--fonte-corpo);
}

.pd-btn .ti {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.pd-btn--route {
  background: var(--azul-medio);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.22);
}

html.dark .pd-btn--route {
  background: var(--azul-claro, #60a5fa);
  color: var(--texto);
}

@media (hover: hover) and (pointer: fine) {
  .pd-btn--route:hover {
    filter: brightness(1.07);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  }
}

.pd-btn:active {
  transform: scale(0.98);
  filter: brightness(0.93);
  transition: transform 0.08s ease, filter 0.08s ease;
}

/* ── Acções secundárias (contactar / guardar / partilhar / denunciar) ── */
.pd-actions-secondary {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pd-actions-secondary .lp-btn {
  flex: 1 1 auto;
  min-width: 100px;
  justify-content: center;
}
.pd-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  border-radius: inherit;
}

.pd-btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

.pd-btn:active::after {
  opacity: 1;
}

.pd-btn--whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 2px 12px rgba(37, 211, 102, 0.28);
}
@media (hover: hover) and (pointer: fine) {
  .pd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  }
  html.dark .pd-btn--route:hover {
    background: #1e2d45;
  }
}
/* Garantir que route não fica azul escuro no active */
.pd-btn--route:active {
  background: var(--azul-suave);
  color: var(--azul-medio);
}

html.dark .pd-btn--route:active {
  background: #1e2d45;
  color: #93c5fd;
}

/* Reset do foco para não ficar stuck após clique */
.pd-btn:focus:not(:focus-visible) {
  outline: none;
  background: inherit;
  box-shadow: none;
  transform: none;
}

/* [FIX B3] lp-btn definido no CSS externo — removido do CSS inline */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background: var(--branco);
  cursor: pointer;
  color: var(--texto-suave);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: var(--fonte-corpo);
}

@media (hover: none) {
  .pd-gallery__zoom-hint {
    opacity: 1;
    transform: scale(1);
  }
}
/*Hover somente onde faz sentido*/
@media (hover: hover) and (pointer: fine) {
  .pd-aval-btn:hover {
    background: var(--azul-ultraclaro);
  }
  html.dark .pd-aval-btn:hover {
    background: #3b82f6;
    color: #fff;
  }
  .pd-aval-ver-mais:hover {
    background: var(--azul-suave);
    border-color: var(--azul-medio);
  }
  .pd-aval-item:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  }
  html.dark .pd-aval-ver-mais:hover {
    background: #1e2d45;
  }
  .pd-related__ver-mais:hover {
    border-color: var(--azul-medio);
    color: var(--azul-medio);
  }
  .lp-btn--saved,
  .lp-btn--saved:hover {
    border-color: #f59e0b;
    color: #d97706;
    background: #fefce8;
  }
  .card--produto .produto-card-ali:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
  }
  .pd-btn--whatsapp:hover {
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.38);
    filter: brightness(1.04);
  }
  .lp-btn:hover {
    border-color: var(--azul-medio);
    color: var(--azul-medio);
  }
  .lp-btn--denunciar:hover {
    border-color: #ef4444;
    color: #ef4444;
  }
  .pd-store-card:hover .pd-store-card__arrow {
    transform: translateX(4px);
  }
  html.dark .lp-btn:hover {
    border-color: #3b82f6;
    color: #93c5fd;
  }
  html.dark .pd-related__ver-mais:hover {
    border-color: #3b82f6;
    color: #93c5fd;
  }
}

.lp-btn--denunciar:active {
  transform: scale(0.96);
}
html.dark .lp-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ── Trust badges ── */
.pd-trust {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

.pd-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--texto-suave);
  background: var(--azul-ultraclaro);
  border: 1px solid var(--azul-suave);
  border-radius: 50px;
  padding: 0.3rem 0.7rem;
}

.pd-trust__item .ti {
  font-size: 0.85rem;
  color: var(--azul-medio);
}

html.dark .pd-trust__item {
  background: #172033;
  border-color: #334155;
}

/* ══════════════════════════════════════════
   AVALIAÇÕES — RESUMO E COMENTÁRIOS
══════════════════════════════════════════ */

.pd-aval-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--azul-ultraclaro);
  border: 1px solid var(--azul-suave);
  border-radius: 14px;
}

html.dark .pd-aval-wrap {
  background: #172033;
  border-color: #334155;
}

.pd-aval-resumo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pd-aval-nota {
  font-family: var(--fonte-titulo);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--texto);
  line-height: 1;
}

.pd-aval-estrelas {
  display: flex;
  align-items: center;
  gap: 1px;
}

.pd-aval-total {
  font-size: 0.78rem;
  color: var(--texto-suave);
  font-weight: 600;
}

.pd-aval-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--azul-medio);
  background: transparent;
  color: var(--azul-medio);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  font-family: var(--fonte-corpo);
}
.pd-aval-btn:active {
  background: var(--azul-medio);
  color: #fff;
}

html.dark .pd-aval-btn {
  border-color: #3b82f6;
  color: #93c5fd;
}
.pd-aval-lista {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.pd-aval-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--branco);
  border: 1px solid var(--azul-suave);
  border-radius: 14px;
  transition: box-shadow 0.2s;
}

html.dark .pd-aval-item {
  background: #1e293b;
  border-color: #334155;
}

.pd-aval-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--azul-medio);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.pd-aval-item__corpo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pd-aval-item__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pd-aval-item__nome {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--texto);
}
.pd-aval-item__texto {
  font-size: 0.86rem;
  color: var(--texto-suave);
  line-height: 1.65;
  margin: 0;
}

.pd-aval-item__data {
  font-size: 0.7rem;
  color: var(--texto-suave);
  opacity: 0.75;
}

/* Botão "Ver mais comentários" */
.pd-aval-ver-mais {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--azul-ultraclaro);
  border: 1.5px solid var(--azul-suave);
  border-radius: 12px;
  color: var(--azul-medio);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  font-family: var(--fonte-corpo);
  margin-top: 0.25rem;
}
/* [FIX B2] Estado de carregamento */
.pd-aval-ver-mais:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

html.dark .pd-aval-ver-mais {
  background: #172033;
  border-color: #334155;
  color: #93c5fd;
}
/* ══════════════════════════════════════════
   "MAIS DESTA LOJA"
══════════════════════════════════════════ */

.pd-related {
  max-width: 1040px;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
  animation: pd-slide-up 0.4s ease 0.15s both;
}

@media (min-width: 720px) {
  .pd-related {
    padding: 0 1.5rem;
  }
}

.pd-related__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--azul-suave);
  padding-top: 0.75rem;
  margin-bottom: 1rem;
}

html.dark .pd-related__header {
  border-color: #334155;
}

.pd-related__title {
  font-family: var(--fonte-titulo);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--texto);
  margin: 0;
}

/* Botão "Ver mais" nos relacionados */
.pd-related__ver-mais {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  border: 1.5px solid var(--azul-suave);
  background: var(--branco);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--azul-medio);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  font-family: var(--fonte-corpo);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
/* [FIX B2] Spinner visível durante carregamento */
.pd-related__ver-mais:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html.dark .pd-related__ver-mais {
  border-color: #475569;
  color: #94a3b8;
}

html.dark .pd-related__ver-mais:active {
  transform: scale(0.96);
}

/* ══════════════════════════════════════════
   SKELETON LOADER
   [FIX B1] — mobile-first: 1 coluna por defeito
══════════════════════════════════════════ */

/* Container do skeleton: 1 coluna no mobile */
.pd-loading {
  max-width: 1040px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr; /* [FIX B1] 1 coluna no mobile */
  gap: 1.5rem;
}

/* 2 colunas a partir de 720px (igual ao pd-wrapper) */
@media (min-width: 720px) {
  .pd-loading {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 0 1.5rem;
  }
}

.pd-skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

/* Animação base do shimmer */
.pd-skeleton,
.skeleton-card {
  background: linear-gradient(
    90deg,
    var(--azul-ultraclaro) 25%,
    var(--azul-suave) 50%,
    var(--azul-ultraclaro) 75%
  );
  background-size: 200% 100%;
  animation: pd-shimmer 1.5s infinite;
}

.pd-skeleton {
  border-radius: 8px;
}

.skeleton-card {
  border-radius: 12px;
}

.pd-skeleton--img {
  aspect-ratio: 1 / 1;
  border-radius: 20px; /* [FIX] igual ao .pd-gallery */
  /* Centrar no mobile como a galeria real */
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .pd-skeleton--img {
    margin: 0;
  }
}

.pd-skeleton--line {
  height: 18px;
  border-radius: 6px;
}

@keyframes pd-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ══════════════════════════════════════════
   ANIMAÇÕES DE ENTRADA
══════════════════════════════════════════ */

@keyframes pd-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pd-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Keyframe para spinners inline (ti-loader-2) */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ══════════════════════════════════════════
   DARK MODE — PRODUTO
══════════════════════════════════════════ */

html.dark .pd-gallery {
  background: #172033;
  border-color: #334155;
}

/* ══════════════════════════════════════════
   RESPONSIVO EXTRA
══════════════════════════════════════════ */

@media (max-width: 380px) {
  .pd-wrapper {
    padding: 0.85rem 0.75rem 0;
  }
  .pd-related {
    padding: 0 0.75rem;
  }
  .pd-loading {
    padding: 0 0.75rem;
  }
  .pd-title {
    font-size: 1.15rem;
  }
  .pd-price {
    font-size: 1.5rem;
  }
}
