/**
 * BLIH! — brandbook Mar 2025 (DESIGN-SYSTEM.md + tokens.json)
 * Camada global sobre Porto/Elementor/Woo — especificidade moderada.
 */
:root {
	--blih-bg: #f5f0ea;
	--blih-bg-alt: #ede8e0;
	--blih-off-white: #ede8e0;
	--blih-sand: #d4c5b0;
	--blih-sage: #c2ceb8;
	--blih-linen: #e5ddd2;
	--blih-warm-gray: #a09890;
	--blih-text: #1a1a1a;
	--blih-muted: #8a7e74;
	--blih-cta: #5c2e1a;
	--blih-accent: #7a2e3a;
	--blih-caramel: #b8845a;
	--blih-navy: #1e3045;
	--blih-olive: #6b7052;
	--blih-line-height-body: 1.6;
	--blih-font-display: "Noto Serif Display", "Playfair Display", Didot, Georgia, serif;
	--blih-font-body: "Work Sans", "Lato", "Montserrat", -apple-system, sans-serif;
	--blih-font-accent: "Dancing Script", "Great Vibes", cursive;
}

html {
	scroll-behavior: smooth;
}

body,
body.porto-narrow-layout {
	background-color: var(--blih-bg) !important;
	color: var(--blih-text);
	font-family: var(--blih-font-body) !important;
	font-size: 16px;
	line-height: var(--blih-line-height-body);
}

/* Tipografia — display serif (sec. 3 brandbook) */
h1,
h2,
h3,
h4,
h5,
h6,
.sidebar .widget-title,
.widget-title,
.porto-ultimate-content-box .porto-sicon-title,
.elementor-heading-title {
	font-family: var(--blih-font-display) !important;
	font-weight: 300 !important;
	letter-spacing: 0.04em;
	color: var(--blih-text) !important;
}

/* Títulos hero / secção — tracking um pouco mais aberto (h1–h2 no main) */
main h1.elementor-heading-title,
main h2.elementor-heading-title,
.single-product .product_title {
	letter-spacing: 0.08em;
}

/* Utilitário opcional no Elementor: classe CSS “blih-title-caps” no widget título */
.blih-title-caps,
.elementor-heading-title.blih-title-caps {
	letter-spacing: 0.12em !important;
	text-transform: uppercase;
}

/* Corpo / captions Woo */
.woocommerce .woocommerce-breadcrumb,
.woocommerce-breadcrumb,
.breadcrumb,
.breadcrumb-wrap,
.posted-in,
.woocommerce-review__published-date,
.woocommerce-result-count,
.woocommerce-ordering,
.product_meta,
.woocommerce-tabs .panel {
	color: var(--blih-muted);
	font-family: var(--blih-font-body);
}

/* Preços Woo — atual em chocolate/espresso; riscado em muted (sec. produto) */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--blih-text);
	font-family: var(--blih-font-body);
	font-weight: 500;
}

.woocommerce ul.products li.product .price del,
.woocommerce div.product p.price del,
.woocommerce div.product span.price del,
.woocommerce ul.products li.product .price del .woocommerce-Price-amount {
	color: var(--blih-muted) !important;
	opacity: 1;
	font-weight: 400;
}

.woocommerce ul.products li.product .price ins,
.woocommerce div.product p.price ins {
	color: var(--blih-cta);
	text-decoration: none;
}

/* Estrelas / rating discretos */
.star-rating span:before,
.woocommerce .star-rating span:before {
	color: var(--blih-caramel) !important;
}

/* Links e CTAs */
a:hover,
#main-toggle-menu .menu-custom-block .elementor-widget-button a:hover {
	color: var(--blih-accent) !important;
}

.btn-primary,
button[type="submit"].btn,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.single_add_to_cart_button,
.porto-hot-label {
	background-color: var(--blih-cta) !important;
	border-color: var(--blih-cta) !important;
	color: var(--blih-bg) !important;
}

.btn-primary:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.single_add_to_cart_button:hover {
	filter: brightness(1.08);
}

/* Formulários — bordas leves, sem caixas pesadas (sec. 6) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
select,
textarea,
.woocommerce .input-text {
	background-color: var(--blih-off-white) !important;
	border: 1px solid var(--blih-linen) !important;
	border-radius: 2px;
	color: var(--blih-text);
	font-family: var(--blih-font-body);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.woocommerce .input-text:focus-visible {
	outline: 2px solid var(--blih-cta);
	outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
	outline: 2px solid var(--blih-accent);
	outline-offset: 2px;
}

/* Notices Woo — sage suave + texto espresso */
.woocommerce-message,
.woocommerce-info,
.woocommerce-notice {
	background-color: rgba(194, 206, 184, 0.35) !important;
	border-top-color: var(--blih-sage) !important;
	color: var(--blih-text) !important;
	border-radius: 2px;
}

.woocommerce-error {
	background-color: rgba(122, 46, 58, 0.08) !important;
	border-top-color: var(--blih-accent) !important;
	color: var(--blih-text) !important;
}

/* Separadores finos (sec. 6) */
hr,
.elementor-widget-divider .elementor-divider-separator {
	border-color: var(--blih-linen) !important;
	opacity: 1;
}

/* Grid produtos — mais respiro (sec. 8 editorial) */
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-4,
.woocommerce ul.products {
	gap: 1.25rem 1rem;
}

@media (min-width: 768px) {
	.woocommerce ul.products {
		gap: 1.5rem 1.25rem;
	}
}

/*
 * Busca no header (camada dropdown Porto + Elementor): não ultrapassar a
 * viewport à direita — largura máxima e ancoragem para dentro (à esquerda do overflow).
 */
#header .elementor-widget-porto_hb_search_form {
	min-width: 0;
	max-width: 100%;
}

#header .searchform-popup.simple-popup,
#header .searchform-popup.search-dropdown {
	max-width: 100%;
}

#header .searchform-popup.simple-popup .searchform,
#header .searchform-popup.search-dropdown .searchform {
	box-sizing: border-box;
	max-width: min(28rem, calc(100vw - 1.5rem)) !important;
	width: min(100%, calc(100vw - 1.5rem)) !important;
	left: auto !important;
	right: 0 !important;
}

#header .searchform-popup .searchform-fields,
#header .searchform-popup .searchform-fields .text,
#header .searchform-popup .searchform-fields input[type="text"],
#header .searchform-popup .searchform-fields input[type="search"] {
	max-width: 100%;
	box-sizing: border-box;
}

#header .searchform-popup .search-lists,
#header .searchform-popup .live-search-list {
	max-width: min(28rem, calc(100vw - 1.5rem));
	box-sizing: border-box;
}

/* Popups Elementor (ex.: drawer) com busca Porto — painel estreito */
.elementor-location-popup .searchform-popup.simple-popup .searchform,
.elementor-location-popup .searchform-popup.search-dropdown .searchform {
	max-width: 100% !important;
	width: 100% !important;
	left: 0 !important;
	right: auto !important;
}

/*
 * Home (6648) — faixa Biquínis/Maiôs: o Elementor reduz padding vertical em ≤991px
 * e some o “ar” do fundo brand; reforçamos para o texture aparecer também no tablet/mobile.
 */
@media (max-width: 991px) {
	.elementor-6648 .elementor-element.elementor-element-de95a93.e-con {
		padding-block-start: 40px !important;
		padding-block-end: 40px !important;
	}
}

@media (max-width: 767px) {
	.elementor-6648 .elementor-element.elementor-element-de95a93.e-con {
		padding-block-start: 28px !important;
		padding-block-end: 28px !important;
	}
}

/* Header / top bar — areia */
#header .header-top,
.top-links > li.menu-item > a {
	background-color: var(--blih-sand) !important;
	color: var(--blih-text) !important;
}

/* Navegação principal — simples, espresso (sec. 8) */
#header .main-menu > li.menu-item > a,
#header .main-menu .narrow ul.sub-menu a,
.mega-menu .sub-menu a,
#header .top-navigation .menu-item > a {
	color: var(--blih-text) !important;
	font-family: var(--blih-font-body);
	font-weight: 500;
	letter-spacing: 0.02em;
}

#header .main-menu > li.menu-item > a:hover,
#header .main-menu .narrow ul.sub-menu a:hover,
.mega-menu .sub-menu a:hover {
	color: var(--blih-accent) !important;
}

/* Mega / painel — fundo warm, não branco puro */
.mega-menu .wide .popup > .inner,
.sidebar-menu .widget .widget-title .toggle,
#nav-panel,
#nav-panel .mobile-menu,
.mmenu-active #nav-panel,
.header-copyright {
	background-color: var(--blih-bg) !important;
	color: var(--blih-text);
}

#nav-panel .mobile-menu li.menu-item > a,
.sidebar-menu .widget .widget .menu > li > a {
	color: var(--blih-text) !important;
}

/* Sticky header quando ativo */
#header.sticky-header .header-main,
#header.sticky-header .main-menu-wrap {
	background-color: rgba(245, 240, 234, 0.97) !important;
	backdrop-filter: blur(6px);
}

/* Rodapé */
#footer,
.footer-main {
	background-color: var(--blih-bg-alt) !important;
	color: var(--blih-text);
}

#footer a {
	color: var(--blih-cta);
}

#footer a:hover {
	color: var(--blih-accent);
}

/* Cards produto */
.woocommerce ul.products li.product .product-inner,
.porto-tb-item,
.elementor-post__card {
	background-color: #fffdf9 !important;
	border-radius: 2px;
	box-shadow: 0 2px 20px rgba(26, 26, 26, 0.06);
	border: 1px solid transparent;
}

/* Accent script — parágrafos com classe utilitária (opcional no Elementor) */
.blih-accent-script {
	font-family: var(--blih-font-accent) !important;
	font-weight: 400;
	font-size: 1.35rem;
	color: var(--blih-muted);
}

/*
 * IMAGENS — filtro “warm / vintage” brandbook sec. 5
 * DESATIVADO por defeito: altera percepção de cor do produto no e-commerce.
 * Para testar, descomentar o bloco abaixo (ou aplicar só a .elementor-widget-image, nunca a PDP se preferirem).
 *
 * .elementor-widget-image img,
 * .woocommerce ul.products li.product img {
 *   filter: saturate(0.95) contrast(1.02) sepia(0.06);
 * }
 */

/* Faixa dev */
body.blih-dev-bar::before {
	content: "DEV — nova loja BLIH! (não indexado)";
	display: block;
	text-align: center;
	font: 500 12px var(--blih-font-body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: var(--blih-sage);
	color: var(--blih-text);
	padding: 6px 8px;
	position: relative;
	z-index: 99999;
}

body.admin-bar.blih-dev-bar::before {
	top: 32px;
}
