/*
 * Vitrine do Ceverinu (plano Lojista, 2026-10-08). Herda a cor do site (--cvn-destaque-site, das camadas de
 * design) e a fonte; o resto é neutro de propósito. Variáveis pra o agente ajustar no design do site:
 * --cvn-loja-destaque, --cvn-loja-raio, --cvn-loja-linha, --cvn-loja-fundo.
 */
:root {
  --cvn-loja-destaque: var(--cvn-destaque-site, #111);
  --cvn-loja-raio: 12px;
  --cvn-loja-linha: color-mix(in srgb, currentColor 14%, transparent);
  --cvn-loja-fundo: color-mix(in srgb, currentColor 4%, transparent);
}

/* — Loja: filtros ao lado da grade — */
.cvn-loja { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.cvn-loja-filtros { position: sticky; top: 24px; font-size: 15px; }
.cvn-loja-filtros > summary { display: none; }
.cvn-loja-filtros section { padding: 18px 0; border-bottom: 1px solid var(--cvn-loja-linha); }
.cvn-loja-filtros h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .02em; text-transform: none; font-weight: 700; }
.cvn-loja-filtros ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cvn-loja-filtros li a { display: flex; justify-content: space-between; gap: 8px; color: inherit; text-decoration: none; opacity: .8; }
.cvn-loja-filtros li a:hover, .cvn-loja-filtros li.atual a { opacity: 1; color: var(--cvn-loja-destaque); }
.cvn-loja-filtros li span { opacity: .6; font-size: 13px; }
.cvn-filtro-opcoes { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.cvn-filtro-opcoes a, .cvn-chave { display: inline-flex !important; justify-content: center !important; padding: 6px 10px; border: 1px solid var(--cvn-loja-linha); border-radius: 999px; font-size: 13px; color: inherit; text-decoration: none; }
.cvn-filtro-opcoes a.ligado, .cvn-chave.ligado { border-color: var(--cvn-loja-destaque); color: var(--cvn-loja-destaque); opacity: 1; font-weight: 600; }
.cvn-filtro-chaves { display: flex; flex-wrap: wrap; gap: 8px; }
.cvn-filtro-preco { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cvn-filtro-preco input { min-width: 0; padding: 8px 10px; border: 1px solid var(--cvn-loja-linha); border-radius: 8px; font: inherit; background: transparent; color: inherit; }
.cvn-filtro-preco button { grid-column: 1 / -1; }
.cvn-limpar { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--cvn-loja-destaque); }

/* — Cartões da grade — */
.cvn-loja .products { gap: 28px 20px; }
.woocommerce ul.products li.product { position: relative; }
.woocommerce ul.products li.product a img { border-radius: var(--cvn-loja-raio); aspect-ratio: 1; object-fit: cover; transition: transform .4s ease; }
.woocommerce ul.products li.product:hover a img { transform: scale(1.02); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 15px; font-weight: 500; }
.woocommerce ul.products li.product .price { color: inherit; font-weight: 700; }
.woocommerce ul.products li.product .price del { opacity: .5; font-weight: 400; }
.woocommerce ul.products li.product .button, .woocommerce div.product form.cart .button, .cvn-filtro-preco button, .cvn-comprar-fixo button, .woocommerce-mini-cart__buttons .button {
  background: var(--cvn-loja-destaque); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer;
}

/* — Etiquetas — */
.woocommerce span.onsale.cvn-etiqueta, .cvn-etiqueta {
  position: absolute; top: 10px; left: 10px; z-index: 2; margin: 0; min-width: 0; min-height: 0; line-height: 1;
  padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--cvn-loja-destaque); color: #fff;
}
.cvn-etiqueta--novo { background: #fff; color: #111; box-shadow: 0 1px 4px rgb(0 0 0 / .15); }
.cvn-etiqueta--esgotado { background: #555; }
.woocommerce span.onsale.cvn-etiqueta + .cvn-etiqueta { top: 40px; }

/* — Busca instantânea — */
.cvn-cabecalho-loja { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cvn-busca { position: relative; }
.cvn-busca input[type="search"] { width: min(260px, 50vw); padding: 9px 14px; border: 1px solid var(--cvn-loja-linha); border-radius: 999px; background: transparent; color: inherit; font: inherit; }
.cvn-busca-resultados { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(380px, 92vw); padding: 8px; border-radius: var(--cvn-loja-raio); background: #fff; color: #111; box-shadow: 0 18px 40px rgb(0 0 0 / .18); }
.cvn-busca-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; color: inherit; text-decoration: none; }
.cvn-busca-item:hover { background: #f4f4f5; }
.cvn-busca-item img, .cvn-busca-sem-foto { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #eee; }
.cvn-busca-nome { font-size: 14px; }
.cvn-busca-preco { font-size: 14px; font-weight: 700; white-space: nowrap; }
.cvn-busca-todos { display: block; padding: 10px 8px 4px; font-size: 13px; color: var(--cvn-loja-destaque); }
.cvn-busca-vazia { margin: 8px; font-size: 14px; opacity: .7; }

/* — Carrinho lateral — */
.cvn-carrinho-botao { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.cvn-carrinho-botao svg { width: 24px; height: 24px; }
.cvn-carrinho-qtd { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--cvn-loja-destaque); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.cvn-gaveta { position: fixed; inset: 0; z-index: 9999; }
.cvn-gaveta-fundo { position: absolute; inset: 0; background: rgb(0 0 0 / .4); }
.cvn-gaveta-painel { position: absolute; inset: 0 0 0 auto; width: min(420px, 100vw); display: flex; flex-direction: column; background: #fff; color: #111; box-shadow: -10px 0 40px rgb(0 0 0 / .2); animation: cvn-gaveta-entra .25s ease-out; }
.cvn-gaveta-painel header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #eee; }
.cvn-gaveta-painel header button { border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: inherit; }
.cvn-gaveta-painel .widget_shopping_cart_content { flex: 1; overflow: auto; padding: 16px 24px 24px; }
.cvn-gaveta-painel .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; }
.cvn-gaveta-painel .woocommerce-mini-cart-item { position: relative; padding: 12px 0 12px 0; border-bottom: 1px solid #eee; }
.cvn-gaveta-painel .woocommerce-mini-cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; float: left; margin-right: 12px; }
.cvn-gaveta-painel .woocommerce-mini-cart__total { display: flex; justify-content: space-between; font-size: 16px; }
.cvn-gaveta-painel .woocommerce-mini-cart__buttons { display: grid; gap: 8px; }
.cvn-gaveta-painel .woocommerce-mini-cart__buttons .button:not(.checkout) { background: transparent; color: inherit; border: 1px solid #ddd; }
html.cvn-gaveta-aberta { overflow: hidden; }
@keyframes cvn-gaveta-entra { from { transform: translateX(40px); opacity: 0; } }

/* — Botão de comprar fixo — */
.cvn-comprar-fixo { position: fixed; left: 50%; bottom: 16px; z-index: 900; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; width: min(720px, calc(100vw - 24px)); padding: 10px 10px 10px 20px; border-radius: 999px; background: #fff; color: #111; box-shadow: 0 12px 40px rgb(0 0 0 / .2); }
.cvn-comprar-fixo-nome { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.cvn-comprar-fixo-preco { font-weight: 700; white-space: nowrap; }

/* — Tamanho e cor em botões — */
.cvn-amostras-select { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none; }
.cvn-amostras { display: flex; flex-wrap: wrap; gap: 8px; }
.cvn-amostra { min-width: 44px; padding: 9px 14px; border: 1px solid var(--cvn-loja-linha); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.cvn-amostra[aria-checked="true"] { border-color: var(--cvn-loja-destaque); box-shadow: inset 0 0 0 1px var(--cvn-loja-destaque); font-weight: 600; }
.cvn-amostra:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

/* — Selos de confiança — */
.cvn-selos { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cvn-selos li { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--cvn-loja-raio); background: var(--cvn-loja-fundo); font-size: 14px; }
.cvn-selos li span { opacity: .7; font-size: 13px; }

/* — Galeria do produto — */
.woocommerce div.product div.images img { border-radius: var(--cvn-loja-raio); }
.woocommerce div.product div.images .flex-control-thumbs li img { border-radius: 8px; }

/* — Celular — */
@media (max-width: 860px) {
  .cvn-loja { grid-template-columns: 1fr; gap: 16px; }
  .cvn-loja-filtros { position: static; }
  .cvn-loja-filtros > summary { display: block; padding: 10px 14px; border: 1px solid var(--cvn-loja-linha); border-radius: 999px; cursor: pointer; font-weight: 600; }
  .cvn-loja-filtros:not([open]) section { display: none; }
  .cvn-busca input[type="search"] { width: 40vw; }
  .cvn-comprar-fixo-nome { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cvn-gaveta-painel { animation: none; }
  .woocommerce ul.products li.product a img { transition: none; }
}
