/* Correções de responsividade e densidade (carregado por último). */

/* "Ver todas" não quebra em duas linhas */
.cat-shelf-all { flex: none; white-space: nowrap; }

/* Cabeçalho de seção: título e botão no mesmo eixo sem espremer o texto */
@media (max-width: 639px) {
  .cat-shelf-head { gap: 12px; margin-bottom: 16px; }
  .cat-shelf-head__copy { min-width: 0; flex: 1 1 0; }
  .cat-shelf-sub { font-size: 0.82rem; }
}

/* Mascote menor no mobile: não cobre preço e botões dos cards */
@media (max-width: 620px) {
  .ig-mascot { right: 2px; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); opacity: 0.92; }
  .ig-mascot img { height: 98px; }
}

/* Checkout: uma coluna até 1023px (duas colunas em 768px ficavam espremidas) */
@media (max-width: 1023px) {
  body #checkout .gm-checkout-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
  body #checkout .ck-right { order: 0; }
}

/* Checkout: menos rolagem e cartões arredondados de ponta a ponta */
@media (max-width: 767px) {
  body #checkout.ig-checkout { padding-top: 16px; padding-bottom: 28px; }
  body #checkout .ck-head { margin-bottom: 10px !important; }
  body #checkout .ck-head h1 { font-size: 1.5rem; line-height: 1.15; }
  body #checkout .gm-checkout-subtitle { font-size: 0.82rem; line-height: 1.4; }
  body #checkout .ig-checkout-breadcrumb { display: none; }
  body #checkout .ck-left { gap: 12px; }
  body #checkout .ck-left > * + * { margin-top: 0 !important; }

  body #checkout .ig-checkout-payment > .border-b,
  body #checkout .ig-checkout-contact > .border-b,
  body #checkout .ig-checkout-card > .border-b,
  body #checkout .ig-checkout-address > .border-b,
  body #checkout .ig-checkout-summary > .border-b { padding: 14px 16px 0 !important; }
  body #checkout .ig-checkout-payment > .border-b + div,
  body #checkout #personal-info,
  body #checkout .ig-checkout-card > .border-b + div,
  body #checkout #address-fields,
  body #checkout .ig-checkout-summary > .border-b + div { padding: 12px 16px 16px !important; }

  body #checkout .ig-checkout-summary #packages-list .ck-item { padding: 10px !important; column-gap: 12px !important; }
  body #checkout .ck-benefits { padding: 10px; }
  body #checkout .ck-ben { flex-wrap: wrap; row-gap: 8px; }
  body #checkout .ck-ben__txt { flex-basis: calc(100% - 40px); }
  body #checkout .ck-ben__btn { margin-left: 30px; min-height: 36px; }
  body #checkout .ck-left .ck-trust { gap: 6px; padding-top: 12px; }
  body #checkout .ck-left .ck-trust li { flex-direction: column; text-align: center; gap: 4px; min-width: 0; }
  body #checkout .ck-left .ck-trust small { display: none; }
  body #checkout #pay-button { min-height: 54px !important; border-radius: 16px !important; }
  body #checkout .ck-reviews-link { margin-top: 10px; }
}

/* Painéis do checkout sem canto reto em nenhuma largura */
body #checkout .ig-checkout-summary,
body #checkout .ck-benefits,
body #checkout .ck-up { overflow: hidden; border-radius: 20px; }
body #checkout input:not([type="checkbox"]):not([type="radio"]),
body #checkout select { min-height: 44px; border-radius: 14px; }

/* Contêiner do resumo: o fundo radial com canto reto aparecia atrás do cartão arredondado */
body .ig-checkout .ck-right,
body #checkout .ck-right { border: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0; }

/* Top 5: nome longo (nowrap) alargava o item do carrossel e deixava cards com tamanhos diferentes */
.t5-item, .t5-card, .t5-body, .t5-name, .t5-foot { min-width: 0; }
.t5-card { width: 100%; }
@media (max-width: 899px) {
  .t5-item { flex: 0 0 min(52%, 200px); width: min(52%, 200px); }
  .t5-cover { aspect-ratio: 3 / 4; }
}

/* Capas do hero da home passavam da tela e criavam rolagem horizontal */
html, body { overflow-x: clip; }

/* Resumo: botão de remover fixo no canto superior direito do cartão, longe do preço */
body #checkout .ig-checkout-summary #packages-list .ck-item { position: relative; }
body #checkout .ig-checkout-summary #packages-list .ck-item .ck-item__remove {
  position: absolute !important; top: 8px; right: 8px; z-index: 2;
  display: grid; place-items: center; width: 32px !important; height: 32px !important; padding: 0;
  grid-area: auto !important; align-self: auto !important; justify-self: auto !important;
}
body #checkout .ig-checkout-summary #packages-list .ck-item .ck-item__name { grid-column: 2 / 4; padding-right: 38px; }
body #checkout .ig-checkout-summary #packages-list .ck-item .ck-item__line { align-self: end; }

/* Combo: botão de carregar mais */
.cb-more {
  display: block; width: fit-content; min-height: 48px; margin: 22px auto 0; padding: 0 28px;
  border: 1px solid rgb(242 193 78 / 0.5); border-radius: 999px; background: rgb(242 193 78 / 0.12);
  color: #f6d680; font-size: 0.9rem; font-weight: 800; cursor: pointer;
  transition: background-color 0.2s ease, transform 0.25s ease;
}
.cb-more[hidden] { display: none; }
.cb-more:hover { background: rgb(242 193 78 / 0.22); transform: translateY(-2px); }
.cb-more:active { transform: scale(0.97); }

/* Desktop: formulário acompanha a rolagem em vez de deixar vão ao lado do resumo longo */
@media (min-width: 1024px) {
  body #checkout .ck-left { position: sticky; top: 96px; align-self: start; }
}

/* Capa larga da Steam nos cartões de produto: aparece inteira sobre fundo desfocado, em vez de cortada */
body .ig-store-card.pk .pk-media.is-wide::before { content: ""; position: absolute; inset: -12%; background: var(--wide) center / cover; filter: blur(22px) brightness(0.55) saturate(1.15); }
body .ig-store-card.pk .pk-media.is-wide .pk-cover { object-fit: contain; }
