/*
 * Branca Boutique — catálogo (loja, categorias, tags). Carregado só nessas páginas.
 *
 * Densidade da grade: o <head> grava a preferência em
 * html[data-branca-desktop="6"] / html[data-branca-mobile="1"] antes da pintura.
 * Sem atributo = padrão (4 no desktop, 2 no mobile). Carrosséis de produtos
 * relacionados/upsell ficam de fora.
 */

.elementor-widget-filtro_avancado_flexivel_e01fa34d { display: none !important; }

/* Barra "Filtrar e ordenar" */
.branca-filter-host { width: 100%; margin: 0 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.branca-filter-trigger { appearance: none; background: #fff; border: 0; padding: 12px 0; display: inline-flex; align-items: center; gap: 12px; color: #141210; font: 500 14px/1.2 "Red Hat Display", sans-serif; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; }
.branca-filter-trigger svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.branca-filter-trigger b { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: #141210; color: #fff; font-size: 11px; }
/* O estilo global de botões do Elementor (Kit) põe borda, padding e display em todo <button>: aqui o botão do filtro não muda. */
.branca-filter-host .branca-filter-trigger { display: inline-flex !important; flex-direction: row !important; align-items: center; width: auto !important; margin: 0 !important; padding: 12px 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #141210 !important; }
.branca-filter-host .branca-filter-trigger:hover, .branca-filter-host .branca-filter-trigger:focus { background: transparent !important; color: #141210 !important; border: 0 !important; }
.branca-filter-host .branca-filter-trigger span { display: inline !important; color: inherit !important; }
.branca-filter-host .branca-filter-trigger b { flex: 0 0 auto !important; width: auto !important; min-width: 20px; height: 20px; padding: 0 6px; line-height: 20px; border-radius: 10px; background: #141210 !important; color: #fff !important; font-weight: 600; }

/* Botões de densidade */
.branca-grid-density { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.branca-grid-density button { display: grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #111; opacity: .38; cursor: pointer; transition: opacity .18s ease, transform .18s ease; }
.branca-grid-density button:hover, .branca-grid-density button[aria-pressed="true"] { opacity: 1; }
.branca-grid-density button:hover { transform: translateY(-1px); }
.branca-grid-density button:focus-visible { outline: 1px solid #111; outline-offset: 4px; opacity: 1; }
.branca-filter-host .branca-grid-density { display: flex !important; align-items: center; gap: 10px; margin-left: auto; }
.branca-filter-host .branca-grid-density button { width: 38px; height: 38px; padding: 7px; background: #fff !important; border: 1px solid transparent !important; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.branca-filter-host .branca-grid-density button[aria-pressed="true"] { border-color: #141210 !important; background: #fff !important; }
.branca-filter-host .branca-grid-density button img { width: 22px; height: 22px; display: block; object-fit: contain; filter: none !important; }
.branca-filter-host .branca-grid-mobile { display: none !important; }

/* Gaveta de filtros */
.branca-filter-overlay { position: fixed; inset: 0; background: rgba(20,18,16,.38); opacity: 0; visibility: hidden; transition: .25s; z-index: 999997; }
.branca-filter-drawer { position: fixed; top: 0; right: 0; width: min(500px, 92vw); height: 100dvh; background: #fff; z-index: 999998; transform: translateX(105%); transition: transform .32s ease; box-shadow: -12px 0 40px rgba(0,0,0,.08); font-family: "Red Hat Display", sans-serif; color: #141210; }
.branca-filter-open .branca-filter-overlay { opacity: 1; visibility: visible; }
.branca-filter-open .branca-filter-drawer { transform: none; }
.branca-filter-open { overflow: hidden; }
.branca-filter-drawer form { height: 100%; display: flex; flex-direction: column; }
.branca-filter-drawer header { min-height: 82px; padding: 0 30px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; border-bottom: 1px solid #e7e3de; }
.branca-filter-drawer header strong { text-transform: uppercase; letter-spacing: .08em; font-size: 16px; }
.branca-filter-drawer header a { color: #141210; text-transform: uppercase; text-decoration: underline; font-size: 12px; }
.branca-filter-drawer header button { border: 0; background: none; font-size: 28px; font-weight: 200; line-height: 1; cursor: pointer; }
.branca-filter-drawer form > section, .branca-filter-drawer details { border-bottom: 1px solid #e7e3de; }
.branca-filter-applied { padding: 28px 30px; }
.branca-filter-applied h3 { margin: 0 0 14px; font: 500 23px/1.2 "Red Hat Display", sans-serif; }
.branca-filter-applied div { display: flex; gap: 8px; flex-wrap: wrap; }
.branca-filter-applied a { border: 1px solid #141210; padding: 9px 11px; color: #141210; text-decoration: none; font-size: 14px; }
.branca-filter-applied a span { margin-left: 7px; }
.branca-filter-drawer summary { list-style: none; padding: 25px 30px; display: flex; justify-content: space-between; align-items: center; font-size: 20px; cursor: pointer; }
.branca-filter-drawer summary::-webkit-details-marker { display: none; }
.branca-filter-drawer summary:after { content: "+"; font-size: 22px; font-weight: 300; }
.branca-filter-drawer details[open] summary:after { content: "−"; }
.branca-filter-options { padding: 0 30px 24px; display: grid; gap: 11px; max-height: 270px; overflow: auto; }
.branca-filter-options label { display: flex; align-items: center; gap: 11px; font-size: 16px; cursor: pointer; }
.branca-filter-options input { appearance: none; width: 20px; height: 20px; border: 1px solid #8b8883; border-radius: 50%; margin: 0; display: grid; place-items: center; }
.branca-filter-options input:checked:after { content: ""; width: 10px; height: 10px; background: #141210; border-radius: 50%; }
.branca-filter-sizes { display: flex; flex-wrap: wrap; gap: 9px; }
.branca-filter-sizes label { display: block; }
.branca-filter-sizes input { position: absolute; opacity: 0; }
.branca-filter-sizes span { min-width: 54px; height: 48px; padding: 0 12px; border: 1px solid #d6d1cb; display: grid; place-items: center; text-transform: uppercase; }
.branca-filter-sizes input:checked + span { background: #141210; color: #fff; border-color: #141210; }
.branca-filter-drawer footer { margin-top: auto; padding: 22px 30px; background: #fff; border-top: 1px solid #e7e3de; }
.branca-filter-drawer footer button { width: 100%; min-height: 54px; border: 1px solid #141210; background: #141210; color: #fff; text-transform: uppercase; letter-spacing: .1em; font: 500 14px "Red Hat Display", sans-serif; cursor: pointer; }

/* Grade de produtos */
body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) { display: grid !important; width: 100%; transition: none; }
body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) > li.product { width: auto !important; max-width: none !important; margin: 0 !important; min-width: 0; }
body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) img { display: block; width: 100%; height: auto; }
/* Todas as fotos na proporção da maioria (2:3, retrato): uma foto mais alongada não deixa o card maior que os outros. O excesso é cortado sem deformar. */
body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) li.product .woocommerce-LoopProduct-link img { aspect-ratio: 2 / 3; height: auto; object-fit: cover; object-position: center; }
/* Botão do card: "Comprar agora" (CatalogFilter::card_button_text), contorno fino, só no hover. */
body.branca-catalog ul.products li.product .woocommerce-loop-product__buttons .button { display: block !important; width: 100%; margin: 10px 0 0 !important; padding: 10px 12px !important; border: 1px solid #111 !important; border-radius: 0 !important; background: transparent !important; color: #111 !important; font: 500 11px/1.2 "Red Hat Display", sans-serif !important; letter-spacing: .14em !important; text-align: center; text-transform: uppercase !important; transition: background .2s, color .2s, opacity .2s; }
body.branca-catalog ul.products li.product .woocommerce-loop-product__buttons .button:hover { background: #111 !important; color: #fff !important; }
@media (hover: hover) {
	body.branca-catalog ul.products li.product .woocommerce-loop-product__buttons { opacity: 0; transition: opacity .2s; }
	body.branca-catalog ul.products li.product:hover .woocommerce-loop-product__buttons,
	body.branca-catalog ul.products li.product:focus-within .woocommerce-loop-product__buttons { opacity: 1; }
}
/* Coração no canto de cima da foto, círculo claro e discreto (referência Animale). */
body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle { top: 10px !important; right: 10px !important; width: 34px; height: 34px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(255,255,255,.85) !important; box-shadow: none; color: #111 !important; font-size: 16px; line-height: 1; }
body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle:hover { background: #fff !important; transform: none; }
body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle.is-favorite { background: rgba(255,255,255,.85) !important; color: #111 !important; }
body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
body.branca-catalog ul.products.elementor-grid .onsale { position: absolute !important; z-index: 4 !important; top: 12px !important; right: auto !important; left: 12px !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 6px 9px !important; border-radius: 0 !important; background: #111 !important; color: #fff !important; font: 600 9px/1 "Red Hat Display", sans-serif !important; letter-spacing: .14em !important; text-transform: uppercase !important; }

@media (min-width: 1025px) {
	body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) { grid-template-columns: repeat(4, minmax(0,1fr)) !important; column-gap: 22px !important; row-gap: 46px !important; }
	html[data-branca-desktop="6"] body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) { grid-template-columns: repeat(6, minmax(0,1fr)) !important; column-gap: 14px !important; row-gap: 38px !important; }
	html[data-branca-desktop="6"] body.branca-catalog ul.products.elementor-grid .woocommerce-loop-product__title { font-size: 13px !important; line-height: 1.35 !important; }
	html[data-branca-desktop="6"] body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle { width: 36px; height: 36px; right: 10px !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
	.branca-grid-density { display: none !important; }
}

@media (max-width: 767px) {
	.branca-filter-host { margin-bottom: 18px; gap: 8px; }
	.branca-filter-trigger { font-size: 13px; width: auto; }
	.branca-filter-host .branca-grid-density { gap: 5px; }
	.branca-filter-host .branca-grid-density button { width: 34px; height: 34px; padding: 6px; }
	.branca-filter-host .branca-grid-density button img { width: 20px; height: 20px; }
	.branca-filter-host .branca-grid-desktop { display: none !important; }
	.branca-filter-host .branca-grid-mobile { display: inline-flex !important; }
	.branca-filter-drawer { width: min(500px, calc(100vw - 18px)); }
	.branca-filter-drawer header { min-height: 70px; padding: 0 20px; gap: 14px; }
	.branca-filter-drawer header a { font-size: 11px; }
	.branca-filter-applied { padding: 22px 20px; }
	.branca-filter-applied h3 { font-size: 20px; }
	.branca-filter-drawer summary { padding: 21px 20px; font-size: 18px; }
	.branca-filter-options { padding: 0 20px 21px; }
	.branca-filter-drawer footer { padding: 16px 20px; }
	.branca-filter-drawer footer button { min-height: 50px; }

	body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) { grid-template-columns: repeat(2, minmax(0,1fr)) !important; column-gap: 12px !important; row-gap: 30px !important; }
	html[data-branca-mobile="1"] body.branca-catalog ul.products.elementor-grid:not(:is(.related, .upsells, .cross-sells, .elementor-widget-loop-carousel, .qodef-qi-product-slider) ul) { grid-template-columns: minmax(0,1fr) !important; column-gap: 0 !important; row-gap: 38px !important; }
	body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle { width: 38px; height: 38px; right: 10px !important; }
	html[data-branca-mobile="1"] body.branca-catalog ul.products.elementor-grid li.product > .branca-favorite-toggle { width: 40px; height: 40px; }
}
