/* ==========================================================================
   Home redesenhada do PromoOnze — isolado de main.css, prefixo `.ph-`
   (page-home) pra nunca colidir com as classes `.landing-*` do resto do
   site. Ver docs/superpowers/specs/2026-09-12-redesign-home-promoonze-design.md
   ========================================================================== */

:root {
  --ph-brand-primary: #FFB800;
  --ph-brand-hover: #E5A500;
  --ph-text-primary: #111315;
  --ph-text-secondary: #25282C;
  --ph-text-muted: #667085;
  --ph-text-subtle: #6B7385; /* ajustado de #7A8494 do prompt original — WCAG AA (~4.6:1) em texto pequeno sobre branco, ver spec */
  --ph-price-sale: #D92D20;
  --ph-price-sale-hover: #B42318;
  --ph-bg-page: #F5F6F7;
  --ph-bg-card: #FFFFFF;
  --ph-border-default: #E4E7EC;
  --ph-border-light: #EAECF0;
  --ph-whatsapp: #128C4A; /* ajustado de #16A34A — só neste uso textual (botão), ver spec */
  --ph-whatsapp-badge: #16A34A;
  --ph-radius-sm: 6px;
  --ph-radius-md: 8px;
  --ph-radius-lg: 12px;
  --ph-radius-xl: 16px;
  --ph-shadow-card: 0 1px 3px rgba(16, 24, 40, 0.06);
  --ph-shadow-hover: 0 4px 12px rgba(16, 24, 40, 0.10);
}

.ph-page {
  margin: 0;
  background: var(--ph-bg-page);
  color: var(--ph-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  overflow-x: hidden;
}

.ph-page * {
  box-sizing: border-box;
}

/* 2. Header escuro ------------------------------------------------------ */

.ph-header {
  background: var(--ph-text-primary);
}

.ph-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

/* Página de post: sem busca no header (ver show_search em single.php), só
   a marca — fica centralizada em vez de colada à esquerda. */
body.single-post .ph-header__inner {
  justify-content: center;
}

.ph-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.ph-header__logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
}

.ph-header__name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ph-header__name span:first-child {
  color: #fff;
}

.ph-header__name span:last-child {
  color: var(--ph-brand-primary);
}

.ph-search {
  flex: 0 1 720px;
  width: 100%;
  min-width: 260px;
  max-width: 720px;
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ph-border-default);
}

.ph-search__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 14px 20px;
  min-width: 0;
}

.ph-search__field svg {
  flex-shrink: 0;
}

.ph-search__placeholder {
  font-size: 16px;
  color: var(--ph-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-search__button {
  width: 60px;
  flex-shrink: 0;
  background: var(--ph-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ph-header__inner {
    padding: 14px 16px;
    gap: 12px;
  }

  .ph-search {
    flex-basis: 100%;
    max-width: none;
  }
}

/* 3. Menu ---------------------------------------------------------------- */

.ph-menu {
  background: #fff;
  border-bottom: 1px solid var(--ph-border-default);
}

.ph-menu__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 13px 40px;
  display: flex;
  align-items: center;
  gap: 30px;
  /* Sem overflow-x aqui de propósito: por regra do CSS, declarar
     overflow-x (mesmo auto) força overflow-y a computar como auto também
     — isso cortava o .ph-menu__dropdown-panel (position:absolute, "vaza"
     pra baixo do menu) mesmo com display:block. Só 2 itens hoje
     (Categorias/Cupons), sem necessidade real de scroll horizontal. */
  flex-wrap: wrap;
}

.ph-menu__item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ph-text-secondary);
  white-space: nowrap;
  min-height: 44px;
  cursor: default;
}

/* "Categorias" — dropdown real quando existe ao menos 1 página de nicho
   publicada (landing_get_nicho_pages(), busca automática, sem config no
   wp-admin). Sem nicho cadastrado, cai no <span> estático de sempre (ver
   home-menu.php). Toggle via assets/js/home-menu.js. */
.ph-menu__item--toggle {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.ph-menu__dropdown {
  position: relative;
}

.ph-menu__dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--ph-bg-card);
  border: 1px solid var(--ph-border-default);
  border-radius: var(--ph-radius-md);
  box-shadow: var(--ph-shadow-hover);
  padding: 8px;
  z-index: 20;
}

.ph-menu__dropdown--open .ph-menu__dropdown-panel {
  display: block;
}

.ph-menu__item--toggle svg {
  transition: transform 0.15s ease;
}

.ph-menu__dropdown--open .ph-menu__item--toggle svg {
  transform: rotate(180deg);
}

.ph-menu__dropdown-link {
  display: block;
  padding: 8px 10px;
  border-radius: var(--ph-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ph-text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.ph-menu__dropdown-link:hover {
  background: var(--ph-bg-page);
  color: var(--ph-text-primary);
}

.ph-menu__cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ph-text-primary);
  background: var(--ph-brand-primary);
  border-radius: var(--ph-radius-md);
  padding: 6px 14px;
  white-space: nowrap;
  min-height: 44px;
}

@media (max-width: 640px) {
  .ph-menu__inner {
    padding: 10px 16px;
    gap: 20px;
  }
}

/* 5. Conteúdo: grid + sidebar --------------------------------------------- */

.ph-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 40px 48px;
  display: grid;
  /* minmax(0, ...) é obrigatório aqui: um "1fr" puro tem largura mínima
     implícita = max-content dos itens da coluna (ex.: .ph-tabs, que não
     quebra linha de propósito pra rolar horizontalmente) — sem o clamp,
     a coluna estoura o viewport em telas estreitas e tudo dentro dela
     (chips de loja, tabs, filtros, grid de cards) fica cortado à direita. */
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.ph-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ph-text-primary);
  margin: 0 0 18px;
}

.ph-stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Some visualmente, mas presente no DOM pra leitores de tela e crawlers
   (SEO) — nome da loja por trás do logo dos chips de "Lojas Parceiras",
   que hoje só tem imagem. Técnica padrão de "clip" em vez de
   display:none/visibility:hidden, que alguns crawlers ignoram. */
.ph-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ph-store-chip {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 150px;
  border: none;
  border-radius: var(--ph-radius-md);
  padding: 14px 20px;
  cursor: pointer;
  min-height: 56px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Mesmo efeito dos botões de loja do [produto]/[produto_ranking]: elevação
   + sombra + brilho cruzando via ::after, em vez de só reduzir opacidade
   como antes. */
.ph-store-chip:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.ph-store-chip::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.ph-store-chip:hover::after {
  left: 130%;
}

.ph-store-chip__logo {
  max-width: 100%;
  max-height: 24px;
  object-fit: contain;
}

.ph-tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--ph-border-light);
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ph-tab {
  font-size: 14px;
  font-weight: 500;
  color: var(--ph-text-muted);
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}

.ph-tab--active {
  font-weight: 700;
  color: var(--ph-text-primary);
  border-bottom-color: var(--ph-brand-primary);
}

.ph-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ph-filter-select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ph-border-default);
  border-radius: var(--ph-radius-md);
  background: var(--ph-bg-card);
  color: var(--ph-text-primary);
  font-size: 14px;
  min-width: 160px;
  cursor: pointer;
}

@media (max-width: 480px) {
  .ph-filter-select {
    flex: 1 1 100%;
  }
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px) {
  .ph-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ph-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px 32px;
  }

  .ph-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .ph-grid {
    grid-template-columns: 1fr;
  }
}

.ph-card {
  background: var(--ph-bg-card);
  border: 1px solid var(--ph-border-default);
  border-radius: var(--ph-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ph-shadow-card);
  transition: box-shadow 0.15s ease;
  cursor: pointer;
}

.ph-card:hover {
  box-shadow: var(--ph-shadow-hover);
}

.ph-card__image-wrap {
  position: relative;
  height: 150px;
  background: var(--ph-bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ph-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--ph-brand-primary);
  color: var(--ph-text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--ph-radius-sm);
}

.ph-card__badge--danger {
  background: var(--ph-price-sale);
  color: #fff;
}

.ph-card__store {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--ph-border-default);
  border-radius: var(--ph-radius-md);
  padding: 4px 9px;
}

.ph-card__store-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ph-card__store-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ph-text-secondary);
}

.ph-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  border-top: 1px solid var(--ph-border-light);
}

.ph-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 38px;
  color: var(--ph-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ph-card__price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.ph-card__price-old {
  font-size: 12px;
  color: var(--ph-text-subtle);
  text-decoration: line-through;
}

.ph-card__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--ph-price-sale);
}

.ph-card__button {
  margin-top: auto;
  padding-top: 4px;
}

.ph-card__button-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--ph-brand-primary);
  color: var(--ph-text-primary);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--ph-radius-md);
  padding: 10px;
  text-decoration: none;
  min-height: 44px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Mesmo efeito dos botões de loja do [produto]/[produto_ranking]: elevação
   + sombra + brilho cruzando via ::after, em vez de só trocar a cor de
   fundo como antes. */
.ph-card__button-inner:hover {
  color: var(--ph-text-primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.ph-card__button-inner::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.ph-card__button-inner:hover::after {
  left: 130%;
}

.ph-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 0 4px;
  color: var(--ph-text-subtle);
  font-size: 12px;
}

/* Sidebar ------------------------------------------------------------- */

.ph-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 20px;
}

@media (max-width: 768px) {
  .ph-sidebar {
    position: static;
    top: auto;
  }
}

.ph-whatsapp-card {
  background: var(--ph-text-primary);
  border-radius: var(--ph-radius-xl);
  padding: 22px;
  text-align: center;
  color: #fff;
}

/* Chamada principal do card — o "porquê" de entrar no grupo, antes de
   qualquer prova social. Fica em cima do contador de propósito: é a
   primeira coisa lida, a prova social (contador/avatares/depoimento)
   entra depois pra reforçar, não pra abrir a conversa. */
.ph-whatsapp-card__pitch {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 16px;
}

.ph-whatsapp-card__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ph-brand-primary);
  margin-bottom: 12px;
}

.ph-whatsapp-card__avatars {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.ph-whatsapp-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--ph-text-primary);
  margin-left: -8px;
  object-fit: cover;
  background: #4B5563;
}

.ph-whatsapp-card__avatar:first-child {
  margin-left: 0;
}

.ph-whatsapp-card__quote {
  font-size: 12px;
  color: #9AA0A6;
  font-style: italic;
  margin: 0 0 16px;
}

.ph-whatsapp-card__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--ph-whatsapp);
  border-radius: var(--ph-radius-md);
  padding: 13px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  min-height: 44px;
}

.ph-whatsapp-card__button:hover {
  opacity: 0.92;
}

.ph-articles-card {
  background: #fff;
  border: 1px solid var(--ph-border-default);
  border-radius: var(--ph-radius-xl);
  padding: 18px;
  box-shadow: var(--ph-shadow-card);
}

.ph-articles-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ph-articles-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ph-text-primary);
}

.ph-article {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--ph-border-light);
  text-decoration: none;
  color: inherit;
}

.ph-article:first-child {
  border-top: none;
  padding-top: 0;
}

.ph-article__thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--ph-radius-md);
  background: var(--ph-bg-page);
  flex-shrink: 0;
  object-fit: cover;
}

.ph-article__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ph-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ph-article__summary {
  font-size: 13px;
  color: var(--ph-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ph-article__date {
  font-size: 11px;
  color: var(--ph-text-subtle);
}

.ph-footer {
  background: var(--ph-text-primary);
  color: #C9D1D9;
  margin-top: 24px;
}

.ph-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ph-footer__disclosure {
  font-size: 12px;
  line-height: 1.6;
  color: #9AA0A6;
  margin: 0;
}

.ph-footer__disclosure a {
  color: var(--ph-brand-primary);
  text-decoration: underline;
}

.ph-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ph-footer__links a {
  font-size: 12px;
  color: #C9D1D9;
  text-decoration: none;
}

.ph-footer__links a:hover {
  color: #fff;
  text-decoration: underline;
}

.ph-footer__copyright {
  font-size: 11px;
  color: #7A8494;
  margin: 0;
}

@media (max-width: 640px) {
  .ph-footer__inner {
    padding: 20px 16px;
  }
}

/* Linha de ranking numerado — shortcode [produto_ranking], usado dentro do
   corpo de posts (ver inc/shortcode-produto-ranking.php). Independente do
   .landing-produto do [produto] original — este componente é só ph-*, pro
   mesmo visual claro do resto da home/post. ------------------------------ */

.ph-ranking-row {
  margin-bottom: 24px;
}

.ph-ranking-row__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  background: var(--ph-bg-card);
  border: 2px solid var(--ph-border-default);
  border-radius: var(--ph-radius-lg);
  padding: 20px 20px 20px 32px;
}

/* Badge numerado — dentro do .ph-ranking-row__card (não mais fora dele),
   sobrepondo o canto superior esquerdo, mesmo padrão do .lr-position da
   referência (posição absoluta dentro da linha). */
.ph-ranking-row__number {
  position: absolute;
  top: -14px;
  left: 16px;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ph-text-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.15);
}

.ph-ranking-row--dourado .ph-ranking-row__card { border-color: #F5A623; }
.ph-ranking-row--azul .ph-ranking-row__card { border-color: #2F80ED; }
.ph-ranking-row--laranja .ph-ranking-row__card { border-color: #F2994A; }

.ph-ranking-row__media {
  /* Caixa de tamanho fixo (não muda com a foto do produto) — object-fit:
     contain abaixo garante que a imagem nunca estoura nem distorce dentro
     dela, mesmo com proporções de foto diferentes entre produtos. */
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-ranking-row__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ph-ranking-row__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* align-items:center + line-height:1 centralizam o texto (emoji + rótulo,
   ex.: "👑 Top de linha") verticalmente na caixa — emoji costuma ter uma
   métrica de altura de linha maior que o texto ao lado, o que sem isso
   deixava o conjunto desalinhado dentro do badge. word-spacing abre um
   respiro a mais depois do emoji (conteúdo é um único texto livre digitado
   no shortcode, sem elemento separado pro ícone). */
.ph-ranking-row__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--ph-radius-md);
  background: var(--ph-border-default);
  color: var(--ph-text-primary);
  font-size: 12px;
  font-weight: 700;
  word-spacing: 3px;
  line-height: 1;
}

.ph-ranking-row--dourado .ph-ranking-row__badge { background: #F5A623; color: #fff; }
.ph-ranking-row--azul .ph-ranking-row__badge { background: #2F80ED; color: #fff; }
.ph-ranking-row--laranja .ph-ranking-row__badge { background: #F2994A; color: #fff; }

.ph-ranking-row__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ph-text-primary);
}

.ph-ranking-row__desc {
  margin: 0;
  font-size: 14px;
  color: var(--ph-text-muted);
  line-height: 1.5;
}

.ph-ranking-row__stores {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ph-ranking-row__stores .ph-ranking-row__store-btn {
  min-width: 170px;
}

/* Altura fixa (não só padding) — com ela, todos os botões da coluna ficam
   exatamente alinhados entre si mesmo se um logo for mais alto/largo que
   outro. Cor por loja via --store-color/--store-text (inline no elemento,
   ver produto-ranking-card.php), mesma fonte de dados dos chips da home
   (landing_get_store_badge_meta(), inc/stores.php) — igual pedido. */
.ph-ranking-row__store-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  background: var(--store-color, var(--ph-price-sale));
  color: var(--store-text, #fff);
  border-radius: var(--ph-radius-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* :hover próprio (não só a:hover global de main.css, que pinta a cor de
   dourado nesta página — precisa ser sobrescrito com a mesma especificidade
   de classe+pseudo-classe pra manter a cor de texto por loja). Mesmo efeito
   do botão do [produto]: elevação + sombra + brilho cruzando via ::after,
   em vez do brightness(0.93) de antes. */
.ph-ranking-row__store-btn:hover {
  color: var(--store-text, #fff);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.ph-ranking-row__store-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.ph-ranking-row__store-btn:hover::after {
  left: 130%;
}

/* Largura FIXA (não só max-width) — cada logo tem uma proporção diferente,
   então um max-width sozinho deixava o "Ver preço" começando numa posição
   diferente em cada botão. Com a caixa sempre do mesmo tamanho (o logo
   "sobra" espaço dentro dela via object-fit: contain), o texto fica sempre
   alinhado, botão a botão. */
/* Recai tanto num <img> (logo .webp) quanto num <span> envolvendo um <svg>
   inline (ícone vetorial, quando cadastrado em landing_get_store_icon_svg())
   — display:flex faz o <span> se comportar como caixa 26x26 igual o <img>,
   e a regra de baixo estica o <svg> pra preencher essa caixa. */
.ph-ranking-row__store-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.ph-ranking-row__store-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .ph-ranking-row__card {
    flex-wrap: wrap;
  }

  .ph-ranking-row__stores {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .ph-ranking-row__store-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
