/* ------------------------------------------------------------------ */
/* Checkout rápido: modais do produto e da cesta                      */
/* ------------------------------------------------------------------ */
.rapido-aberto, .rapido-aberto body { overflow: hidden; }
.rapido { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.rapido[hidden] { display: none; }
.rapido__fundo { position: absolute; inset: 0; background: rgba(4, 10, 6, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.rapido__painel {
	position: relative; width: min(880px, 100%); max-height: calc(100vh - 40px); overflow: auto;
	background: linear-gradient(180deg, rgba(38, 49, 26, .98), rgba(12, 22, 12, .98));
	border: 1px solid rgba(217, 181, 74, .55); border-radius: 4px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(246, 227, 161, .06);
	opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .22s, transform .22s;
	font-family: var(--fonte-ui);
}
.rapido.is-aberto .rapido__fundo { opacity: 1; }
.rapido.is-aberto .rapido__painel { opacity: 1; transform: none; }
.rapido__fechar {
	position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center;
	background: rgba(7, 19, 15, .7); color: var(--dourado-claro); border: 1px solid rgba(217, 181, 74, .5); border-radius: 2px;
	font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.rapido__fechar:hover { background: rgba(86, 104, 44, .9); }

/* Produto */
.rapido__painel--produto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rapido__imagem { background: #0a140c; }
.rapido__imagem img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.rapido__info { padding: 36px 32px 32px; display: flex; flex-direction: column; justify-content: center; }
.rapido__cat { margin: 0 0 8px; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dourado); }
.rapido__nome { margin: 0 0 8px; font-family: var(--fonte-titulo); font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--ouro); line-height: 1.2; }
.rapido__sub { margin: 0 0 16px; font-style: italic; color: var(--tinta-suave); line-height: 1.5; }
.rapido__preco { margin: 0 0 4px; font-size: 1.6rem; font-weight: 600; color: var(--dourado-claro); }
.rapido__estoque { margin: 0 0 22px; font-size: .85rem; color: var(--tinta-suave); min-height: 1.2em; }
.rapido__acao { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.rapido__acao[hidden] { display: none; }
.rapido__qtd { display: inline-flex; border: 1px solid rgba(217, 181, 74, .55); border-radius: 2px; }
.rapido__qtd button { width: 40px; background: transparent; border: 0; color: var(--dourado-claro); font-size: 1.2rem; cursor: pointer; }
.rapido__qtd button:hover { background: rgba(217, 181, 74, .12); }
.rapido__qtd input { width: 48px; text-align: center; border: 0; background: transparent; color: var(--tinta); font: 600 1.05rem var(--fonte-ui); -moz-appearance: textfield; }
.rapido__qtd input::-webkit-outer-spin-button, .rapido__qtd input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rapido__presentear { flex: 1; min-width: 160px; }
.rapido__presentear[disabled] { opacity: .7; cursor: progress; }
.rapido__adicionado[hidden], .rapido__erro[hidden] { display: none; }
.rapido__ok { margin: 0 0 14px; font-family: var(--fonte-titulo); font-size: 1.15rem; color: var(--dourado-claro); text-shadow: 0 0 14px rgba(255, 214, 110, .4); }
.rapido__botoes { display: flex; gap: 10px; flex-wrap: wrap; }
.rapido__botoes .bosque-botao { flex: 1; min-width: 150px; }
.rapido__erro { margin: 14px 0 0; font-size: .9rem; color: #f2b8a8; }

/* Cesta / checkout */
.rapido__painel--checkout { width: min(960px, 100%); height: min(88vh, 900px); display: flex; flex-direction: column; overflow: hidden; }
.rapido__topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 24px; border-bottom: 1px solid rgba(217, 181, 74, .3); }
.rapido__titulo { font-family: var(--fonte-titulo); font-size: 1.2rem; color: var(--ouro); }
.rapido__fechar--topo { position: static; }
.rapido__painel--checkout iframe { flex: 1; width: 100%; border: 0; background: var(--noite); }
.rapido__carregando { display: none; position: absolute; inset: 60px 0 0; place-items: center; color: var(--dourado-claro); letter-spacing: .12em; }
.rapido.is-carregando .rapido__carregando { display: grid; }
.rapido.is-carregando iframe { opacity: 0; }

@media (max-width: 700px) {
	.rapido { padding: 0; align-items: end; }
	.rapido__painel { max-height: 94vh; border-radius: 10px 10px 0 0; }
	.rapido__painel--produto { grid-template-columns: 1fr; }
	.rapido__imagem img { aspect-ratio: 16 / 11; }
	.rapido__info { padding: 22px 20px 26px; }
	.rapido__painel--checkout { height: 94vh; }
}

/* Páginas abertas dentro do modal */
html.modo-modal .bosque-cena, html.modo-modal .bosque-topo, html.modo-modal .bosque-rodape, html.modo-modal .playlist, html.modo-modal #wpadminbar { display: none !important; }
html.modo-modal { margin-top: 0 !important; }
html.modo-modal body { background: var(--noite); }
html.modo-modal .bosque-conteudo { padding: 0 16px 30px; }
html.modo-modal .bosque-pagina { padding-top: 16px; }
html.modo-modal .bosque-pergaminho { box-shadow: none; background: transparent; border: 0; padding: 12px 8px; backdrop-filter: none; }
html.modo-modal .bosque-entrada__titulo { display: none; }
html.modo-modal .woocommerce-checkout .col2-set { grid-template-columns: 1fr; gap: 0; }

/* brilho enquanto a foto do presente carrega */
.rapido__imagem { position: relative; min-height: 240px; }
.rapido__imagem img { transition: opacity .25s; }
.rapido__imagem.is-carregando img { opacity: 0; }
.rapido__imagem.is-carregando::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(100deg, rgba(38, 49, 26, .6) 20%, rgba(217, 181, 74, .18) 50%, rgba(38, 49, 26, .6) 80%);
	background-size: 200% 100%; animation: rapido-brilho 1.2s linear infinite;
}
@keyframes rapido-brilho { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* carregamento do checkout no tema escuro (o padrão do WooCommerce era um véu branco) */
html.modo-modal .blockUI.blockOverlay { background: rgba(7, 19, 15, .55) !important; opacity: 1 !important; }
html.modo-modal .blockUI.blockOverlay::before { border-color: var(--dourado) transparent var(--dourado) transparent !important; }
html.modo-modal .woocommerce-customer-details { display: none; }
html.modo-modal #place_order.is-enviando { opacity: .7; }
