/* Vitrine. Cores, fontes e colunas chegam por variáveis CSS definidas em storefront/base.html. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--cor-fundo); color: var(--cor-texto); font-family: var(--fonte-texto); line-height: 1.5; }
h1, h2, h3 { font-family: var(--fonte-titulo); line-height: 1.2; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(1200px, 100% - 2rem); margin-inline: auto; }

/* Cabeçalho no estilo do Your Next Store (docs/terceiros/your-next-store.md): fixo no topo, fundo translúcido,
   logo, categorias, busca e carrinho. A posição do logo vem de theme.logo_position. */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--cor-destaque); background: color-mix(in srgb, var(--cor-fundo) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; min-height: 4rem; padding-block: .5rem; }
.site-logo { font-family: var(--fonte-titulo); font-size: 1.35rem; font-weight: 700; text-decoration: none; }
/* altura do logo escolhida na Aparência (LOGO_SIZE_LABELS); a largura acompanha até 360 px (logo largo diminui) */
.site-logo img { max-height: 56px; max-width: min(100%, 360px); width: auto; object-fit: contain; }
.site-logo--small img { max-height: 40px; }
.site-logo--large img { max-height: 80px; }
.site-nav { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; font-size: .95rem; font-weight: 500; }
.site-nav a { text-decoration: none; color: color-mix(in srgb, var(--cor-texto) 72%, transparent); transition: color .15s; }
.site-nav a:hover { color: var(--cor-texto); }
.site-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.site-actions .search { width: 15rem; }
/* logo no centro ou acima do menu: o logo ocupa a primeira linha; categorias, busca e carrinho vão para a segunda.
   No centro, uma grade de três colunas deixa as categorias no meio da página, alinhadas com o logo. */
.site-header--center .site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.site-header--center .site-logo { grid-column: 1 / -1; text-align: center; }
.site-header--center .site-logo img { margin-inline: auto; }
.site-header--center .site-nav { grid-column: 2; }
.site-header--center .site-actions { grid-column: 3; }
.site-header--stacked .site-logo { flex-basis: 100%; }
.site-header--stacked .site-nav { justify-content: flex-start; }
.site-cart { position: relative; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; text-decoration: none; }
.site-cart:hover, .site-menu summary:hover { background: color-mix(in srgb, var(--cor-texto) 8%, transparent); }
.site-cart__count { position: absolute; top: -.15rem; right: -.15rem; display: grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding-inline: .3rem; border-radius: 999px; background: var(--cor-texto); color: var(--cor-fundo); font-size: .7rem; font-weight: 700; }
.site-cart__count[hidden] { display: none; }
.icon { display: block; width: 1.4rem; height: 1.4rem; }
/* menu do celular: <details> com o painel logo abaixo do cabeçalho, na largura toda */
.site-menu { display: none; }
.site-menu summary { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; list-style: none; cursor: pointer; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] .icon--menu, .site-menu:not([open]) .icon--close { display: none; }
.site-menu__panel { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100dvh - 4rem); overflow-y: auto; padding: 1rem max(1rem, (100% - 1200px) / 2) 1.5rem; border-bottom: 1px solid var(--cor-destaque); background: var(--cor-fundo); box-shadow: 0 16px 32px color-mix(in srgb, var(--cor-texto) 12%, transparent); }
.site-menu__panel .search { max-width: none; }
.site-menu__panel nav { display: flex; flex-direction: column; margin-top: .75rem; }
.site-menu__panel nav a { padding: .7rem .5rem; border-radius: 8px; text-decoration: none; font-weight: 500; }
.site-menu__panel nav a:hover { background: color-mix(in srgb, var(--cor-texto) 6%, transparent); }
@media (max-width: 720px) {
  .site-header__inner, .site-header--center .site-header__inner { display: flex; flex-wrap: nowrap; gap: .5rem; }
  .site-menu { display: block; }
  .site-nav, .site-actions .search { display: none; }
  .site-header--stacked .site-logo { flex-basis: auto; }
  .site-logo { flex: 1; min-width: 0; font-size: 1.15rem; }
  .site-header--center .site-logo { text-align: center; }
  .site-logo img { max-height: 40px; }
}

/* Barra de aviso no topo: cores do tema invertidas */
.announcement { padding: .5rem 1rem; background: var(--cor-primaria); color: var(--cor-fundo); text-align: center; font-size: .9rem; }
.announcement a { display: block; color: inherit; }

/* Carrossel da página inicial: 3:1 no computador, 1:1 no celular; a rolagem é do próprio navegador */
.hero { position: relative; margin-block: 1.5rem; }
.hero__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; }
.hero__track::-webkit-scrollbar { display: none; }
.hero__slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 1; display: flex; align-items: flex-end; background: var(--cor-destaque); }
.hero__slide--plain { align-items: center; }
.hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__content { position: relative; max-width: 32rem; margin: 2rem 4rem 3rem; padding: 1.5rem; border-radius: 8px; background: color-mix(in srgb, var(--cor-fundo) 85%, transparent); }
.hero__content h2 { margin: 0 0 .5rem; font-size: clamp(1.35rem, 1rem + 1.8vw, 2.25rem); letter-spacing: -.01em; }
.hero__content p { margin: 0 0 1rem; }
.hero__content p:last-child { margin-bottom: 0; }
.hero__button { display: inline-flex; align-items: center; height: 3rem; padding-inline: 1.75rem; border-radius: 999px; background: var(--cor-primaria); color: var(--cor-fundo); font-weight: 600; text-decoration: none; transition: opacity .15s; }
.hero__button:hover { opacity: .9; }
.hero__link { position: absolute; inset: 0; }
.hero__arrow { position: absolute; top: 50%; translate: 0 -50%; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--cor-fundo) 85%, transparent); color: var(--cor-texto); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.hero__arrow--prev { left: .75rem; }
.hero__arrow--next { right: .75rem; }
.hero__dots { position: absolute; bottom: .5rem; left: 50%; translate: -50% 0; display: flex; }
.hero__dots button { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; background: none; cursor: pointer; }
.hero__dots button::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: color-mix(in srgb, var(--cor-fundo) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cor-texto) 25%, transparent); }
.hero__dots button[aria-current="true"]::before { background: var(--cor-fundo); }
@media (max-width: 720px) {
  .hero__slide { aspect-ratio: 1; }
  .hero__content { margin: 1rem 1rem 2.5rem; padding: 1rem; }
  .hero__arrow { display: none; }
}

/* Lista de produtos: o layout vem de theme.layout */
.products { list-style: none; margin-block: 2rem; padding: 0; display: grid; gap: 1.5rem; }
.products--grid { grid-template-columns: repeat(var(--colunas), 1fr); }
/* 4 colunas: o destaque (2x2) fica com metade da largura; em 3 ele passava da altura da tela */
.products--featured { grid-template-columns: repeat(4, 1fr); }
.products--featured > li:first-child { grid-column: span 2; grid-row: span 2; }
.products--list { grid-template-columns: 1fr; }
/* a última linha absorve a altura da foto: título, preço e selo ficam juntos no topo */
.products--list .card { display: grid; grid-template-columns: 160px 1fr; grid-template-rows: auto auto 1fr; column-gap: 1rem; }
.products--list .card__image { grid-row: span 3; }
.products--list .badge { justify-self: start; align-self: start; }
.products--carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.products--carousel > li { flex: 0 0 min(260px, 80%); scroll-snap-align: start; }
@media (max-width: 720px) {
  .products--grid, .products--featured { grid-template-columns: repeat(2, 1fr); }
  .products--featured > li:first-child { grid-row: auto; }
}
.card { display: block; text-decoration: none; }
.card__image { aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--cor-destaque); }
.card__image img { width: 100%; height: 100%; object-fit: cover; }
.card__title { margin: .75rem 0 .25rem; font-size: 1rem; }
.card__price { margin: 0; color: var(--cor-primaria); font-weight: 600; }
.badge { display: inline-block; margin-top: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; background: var(--cor-destaque); }

/* Página do produto */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-block: 2rem; }
@media (max-width: 720px) { .product { grid-template-columns: 1fr; } }
.product__gallery { display: grid; gap: .75rem; }
.product__gallery img { border-radius: 8px; }
.product__placeholder { aspect-ratio: 1; border-radius: 8px; background: var(--cor-destaque); }
.product__price { color: var(--cor-primaria); font-size: 1.5rem; font-weight: 700; }
.product__description { white-space: pre-line; }
.product label { display: block; margin-block: .75rem; }
.product select { display: block; min-width: 12rem; margin-top: .25rem; padding: .5rem; font: inherit; }

.empty { color: color-mix(in srgb, var(--cor-texto) 65%, transparent); }
.error-page { padding-block: 4rem; text-align: center; }

/* Carrinho */
.button { display: inline-block; text-decoration: none; padding: .75rem 1.5rem; border: 0; border-radius: 8px; background: var(--cor-primaria); color: var(--cor-fundo); font: inherit; font-weight: 600; cursor: pointer; }
.button:disabled { opacity: .45; cursor: not-allowed; }
/* Busca: página /busca e cabeçalho */
.search { position: relative; max-width: 32rem; }
.search input { width: 100%; height: 2.5rem; padding: 0 2.75rem 0 .9rem; border: 1px solid color-mix(in srgb, var(--cor-texto) 22%, transparent); border-radius: 8px; background: var(--cor-fundo); color: var(--cor-texto); font: inherit; font-size: .95rem; }
.search input:focus { outline: 2px solid color-mix(in srgb, var(--cor-texto) 35%, transparent); outline-offset: 1px; }
.search button { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.search .icon { width: 1.15rem; height: 1.15rem; }
.product__buy input[type=number] { display: block; width: 6rem; margin-top: .25rem; padding: .5rem; font: inherit; }
.feedback { margin-block: .75rem; }
.feedback--error { color: #b42318; }
.cart-lines { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1rem; }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto auto; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--cor-destaque); }
.cart-line__image { aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--cor-destaque); }
.cart-line__image img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__info { display: grid; }
.cart-line input[type=number] { width: 4.5rem; padding: .4rem; font: inherit; }
.link-button { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.cart-subtotal { font-size: 1.25rem; text-align: right; }
@media (max-width: 720px) { .cart-line { grid-template-columns: 64px 1fr; } }

/* Frete no carrinho */
.shipping { margin-block: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--cor-destaque); }
.shipping form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.shipping input[name=cep] { display: block; width: 10rem; margin-top: .25rem; padding: .6rem; font: inherit; }
.shipping fieldset { border: 0; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.shipping legend { font-weight: 600; margin-bottom: .5rem; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; margin-block: 1.5rem; }
.checkout fieldset { border: 1px solid var(--cor-destaque); border-radius: 8px; margin: 0 0 1rem; padding: 1rem; }
.checkout legend { font-weight: 600; padding-inline: .25rem; }
.checkout .field { display: block; margin-block: .5rem; }
.checkout .field input, .checkout .field select { display: block; width: 100%; box-sizing: border-box; margin-top: .25rem; padding: .6rem; font: inherit; }
.checkout__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkout .choice { display: block; margin-block: .4rem; }
.checkout__summary ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.checkout__summary li { display: flex; justify-content: space-between; gap: 1rem; }
@media (max-width: 720px) { .checkout { grid-template-columns: 1fr; } }

/* Página do pedido */
.order { max-width: 40rem; margin-block: 1.5rem; }
.order__status { display: inline-block; padding: .25rem .75rem; border-radius: 999px; background: var(--cor-destaque); font-weight: 600; }
.order__status--aguardando_pagamento { background: #fef3c7; color: #92400e; }
.order__status--pago, .order__status--entregue { background: #dcfce7; color: #166534; }
.order__status--enviado { background: #dbeafe; color: #1e40af; }
.order__status--cancelado { background: #fee2e2; color: #991b1b; }
.choice__hint { display: block; margin-left: 1.5rem; opacity: .7; }
.option-total { opacity: .75; }
.button--outline { background: transparent; color: var(--cor-primaria); border: 1px solid var(--cor-primaria); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.checkout__summary { grid-column: 2; grid-row: 1; padding: 1rem 1.25rem; border-radius: 8px; background: var(--cor-destaque); }
.checkout__form { grid-column: 1; grid-row: 1; }
.checkout__total { font-size: 1.25rem; }
.checkout__summary p { display: flex; justify-content: space-between; gap: 1rem; margin: .5rem 0; }
@media (max-width: 720px) { .checkout__summary, .checkout__form { grid-column: 1; grid-row: auto; } }
.order__steps { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 1rem 0; }
.order__step { flex: 1; padding: .5rem; border-radius: 8px; border: 1px dashed var(--cor-destaque); text-align: center; font-size: .9rem; }
.order__step.is-done { opacity: 1; font-weight: 600; background: #dcfce7; color: #166534; border-color: #bbe5c8; }
.order__notice { margin-block: 1rem; padding: 1rem; border-radius: 8px; border: 1px solid var(--cor-destaque); }
.order__notice--ok { background: color-mix(in srgb, #16a34a 14%, var(--cor-fundo)); border-color: color-mix(in srgb, #16a34a 45%, var(--cor-fundo)); }
.order__notice--error { background: color-mix(in srgb, #dc2626 14%, var(--cor-fundo)); border-color: color-mix(in srgb, #dc2626 45%, var(--cor-fundo)); }
.order__pay--warn { background: color-mix(in srgb, #d97706 14%, var(--cor-fundo)); border-color: color-mix(in srgb, #d97706 45%, var(--cor-fundo)); }
.order__keep { margin-block: 1.5rem; padding: 1rem; border-radius: 8px; background: var(--cor-destaque); }
.order__keep h2 { margin: 0 0 .25rem; font-size: 1rem; }
.order__keep p { margin: 0 0 .75rem; }
.order__keep-row { display: flex; gap: .5rem; }
.order__keep-row input { flex: 1; min-width: 0; padding: .6rem; font: inherit; border: 1px solid #cbd2d9; border-radius: 8px; }
.copy-status { display: block; min-height: 1.2em; margin-top: .4rem; }
.order__pay form { display: inline-block; margin: .5rem .5rem 0 0; }
.order__pix, .order__pay { margin-block: 1.5rem; padding: 1rem; border: 1px solid var(--cor-destaque); border-radius: 8px; }
.order__qr { max-width: 240px; }
.order__pix textarea { display: block; width: 100%; box-sizing: border-box; margin-block: .5rem; padding: .5rem; font: inherit; font-size: .85rem; }
.order__items { list-style: none; padding: 0; display: grid; gap: .5rem; }
.order__items li { display: flex; justify-content: space-between; gap: 1rem; }
.order__total { font-size: 1.25rem; }

/* Rodapé no estilo do Your Next Store (docs/terceiros/your-next-store.md): colunas com respiro e linha final */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--cor-destaque); font-size: .9rem; }
.site-footer__columns { display: flex; flex-wrap: wrap; gap: 2rem 4rem; padding-block: 3rem; }
.site-footer__brand { flex: 1 1 16rem; max-width: 24rem; }
.site-footer__logo { font-family: var(--fonte-titulo); font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.site-footer__logo img { max-height: 40px; width: auto; }
.site-footer__legal, .site-footer__column a, .site-footer__bottom { color: color-mix(in srgb, var(--cor-texto) 65%, transparent); }
.site-footer__legal { margin: 1rem 0 0; line-height: 1.7; }
.site-footer h2 { margin: 0 0 1rem; font-family: var(--fonte-texto); font-size: .9rem; font-weight: 600; }
.site-footer ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.site-footer__column a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; transition: color .15s; }
.site-footer__column a:hover { color: var(--cor-texto); }
.brand { display: block; width: 1rem; height: 1rem; }
.site-footer__social { display: flex; gap: .5rem; margin: 1rem 0 0; }
.site-footer__social a { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: color-mix(in srgb, var(--cor-texto) 7%, transparent); }
.site-footer ul.site-footer__badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.site-footer__badges li { padding: .3rem .7rem; border: 1px solid color-mix(in srgb, var(--cor-texto) 20%, transparent); border-radius: 6px; font-size: .8rem; font-weight: 600; }
.site-footer__bottom { margin: 0; padding-block: 1.5rem; border-top: 1px solid var(--cor-destaque); font-size: .85rem; }
@media (max-width: 720px) {
  .site-footer__columns { flex-direction: column; gap: 2rem; padding-block: 2.5rem; }
  .site-footer__brand { flex: none; }  /* em coluna, o flex-basis viraria altura */
}
