/*
Theme Name: Pellets Child
Template: kadence
Description: Tema filho da loja de pellets (personalizações aqui).
Version: 1.0.2
Text Domain: pellets-child
*/

/* =========================================================
   Variáveis (as cores vêm da paleta Kadence)
   ========================================================= */
:root {
	--pl-green: var(--global-palette1);
	--pl-green-dark: var(--global-palette2);
	--pl-dark: var(--global-palette4);
	--pl-border: var(--global-palette7);
	--pl-radius: 8px;
	--pl-shadow: 0 6px 24px rgba(38, 50, 56, .08);
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.01em; }

/* =========================================================
   Cabeçalho
   ========================================================= */
.site-top-header-wrap .header-html-inner { display: flex; gap: 28px; }
.pl-topbar { opacity: .9; }
.pl-topbar a { color: #fff; text-decoration: none; }

.site-main-header-wrap .site-header-row-container-inner {
	border-bottom: 1px solid var(--pl-border);
}
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	font-weight: 600;
	font-size: 15px;
}
.header-cart-button .header-cart-total {
	background: var(--pl-green);
	color: #fff;
}

/* =========================================================
   Página inicial
   ========================================================= */
.pl-hero .wp-block-cover__inner-container { max-width: 760px; text-align: center; }
.pl-hero h1, .pl-hero p { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.pl-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 48px); line-height: 1.15; margin: 8px 0 16px; }
.pl-hero p { color: #CFD8DC; font-size: 18px; }
.pl-hero .pl-eyebrow {
	color: #81C784; font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .12em;
}
.pl-hero .wp-block-buttons { justify-content: center; margin-top: 24px; }
.pl-hero .wp-block-button__link { padding: 14px 32px; font-weight: 700; }

.pl-section { max-width: 1290px; margin: 0 auto; padding: 56px 24px; }
.pl-section > h2 { font-size: 28px; margin-bottom: 24px; }

/* Secção categorias (tuiles com imagem) */
.pl-section--cats { text-align: center; padding-top: 72px; }
.pl-section--cats > h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 32px; }
.pl-kicker {
	color: var(--pl-green); font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .12em; margin: 0 0 6px;
}
.pl-cats {
	display: grid; gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	text-align: left;
}
@media (max-width: 1024px) { .pl-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .pl-cats { grid-template-columns: 1fr; } }
.pl-cat {
	position: relative; display: block; overflow: hidden;
	aspect-ratio: 4 / 5; max-height: 420px;
	border-radius: 12px; background: var(--pl-dark);
	color: #fff; text-decoration: none;
	box-shadow: var(--pl-shadow);
}
.pl-cat__img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; transition: transform .5s ease;
}
.pl-cat::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(28,37,41,.9) 0%, rgba(28,37,41,.25) 55%, rgba(28,37,41,0) 100%);
}
.pl-cat--noimg { background: linear-gradient(135deg, #37474F, #263238); }
.pl-cat__body {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
	padding: 24px; display: flex; flex-direction: column; gap: 4px;
}
.pl-cat__name { font-size: 22px; font-weight: 800; line-height: 1.2; color: #fff; }
.pl-cat__count { font-size: 13px; color: #CFD8DC; }
.pl-cat__cta {
	margin-top: 10px; align-self: flex-start;
	background: var(--pl-green); color: #fff; font-weight: 700; font-size: 14px;
	padding: 8px 16px; border-radius: 6px; transition: background .2s;
}
.pl-cat:hover .pl-cat__img { transform: scale(1.06); }
.pl-cat:hover .pl-cat__cta { background: var(--pl-green-dark); }
.pl-cat:focus-visible { outline: 3px solid var(--pl-green); outline-offset: 3px; }

/* Botão "Ver mais produtos" por baixo dos destaques */
.pl-more { justify-content: center; margin-top: 36px; }
.pl-more .wp-block-button__link {
	background: transparent; color: var(--pl-green); border: 2px solid var(--pl-green);
	border-radius: 6px; padding: 13px 34px; font-weight: 700;
	transition: background .2s, color .2s;
}
.pl-more .wp-block-button__link::after { content: " \2192"; }
.pl-more .wp-block-button__link:hover { background: var(--pl-green); color: #fff; }

/* Vantagens: ícone + título + texto, centrados, sem caixas */
.pl-benefits2 {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
	text-align: center; padding-top: 48px; padding-bottom: 48px;
}
.pl-benefit { display: flex; flex-direction: column; align-items: center; }
.pl-benefit__icon { color: var(--global-palette3); height: 44px; margin-bottom: 18px; }
.pl-benefit__title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--global-palette3); letter-spacing: 0; }
.pl-benefit__text { margin: 0; font-size: 16px; color: var(--global-palette4); max-width: 340px; }
@media (max-width: 767px) {
	.pl-benefits2 { grid-template-columns: 1fr; gap: 32px; }
}

.pl-benefits .wp-block-column {
	background: #fff; border: 1px solid var(--pl-border);
	border-top: 3px solid var(--pl-green);
	border-radius: var(--pl-radius); padding: 24px;
}
.pl-benefits h3 { font-size: 18px; margin: 0 0 6px; }
.pl-benefits p { margin: 0; color: var(--global-palette5); }

/* =========================================================
   Produtos (cartões)
   ========================================================= */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product-category {
	background: #fff;
	border: 1px solid var(--pl-border);
	border-radius: var(--pl-radius);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.woocommerce ul.products li.product:hover,
.woocommerce ul.products li.product-category:hover {
	box-shadow: var(--pl-shadow);
	transform: translateY(-2px);
}
.woocommerce ul.products li.product .price { color: var(--pl-green); font-weight: 700; }

/* Paginação da loja (12 produtos por página) */
.woocommerce nav.woocommerce-pagination { margin: 40px 0 8px; text-align: center; }
.woocommerce nav.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination ul.page-numbers {
	display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px;
	border: 0; margin: 0; padding: 0;
}
.woocommerce nav.woocommerce-pagination ul li { border: 0; float: none; overflow: visible; }
.woocommerce nav.woocommerce-pagination ul li .page-numbers {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
	background: #fff; border: 1px solid var(--pl-border); border-radius: 8px;
	color: var(--pl-dark); font-weight: 600; text-decoration: none; line-height: 1;
	transition: border-color .2s, color .2s, background .2s;
}
.woocommerce nav.woocommerce-pagination ul li a.page-numbers:hover { border-color: var(--pl-green); color: var(--pl-green); background: #fff; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--pl-green); border-color: var(--pl-green); color: #fff; }
.woocommerce nav.woocommerce-pagination ul li .dots { background: none; border: 0; }

.pl-price-kg { margin: -6px 0 12px; font-size: 13px; color: var(--global-palette6); }
.woocommerce ul.products .pl-price-kg { margin: 0 0 8px; }

/* =========================================================
   Página de produto
   ========================================================= */
/* Imagem principal: ocupa toda a coluna (mesmo que o ficheiro seja pequeno) */
.single-product div.product .woocommerce-product-gallery {
	background: #fff; border: 1px solid var(--pl-border);
	border-radius: 12px; overflow: hidden;
}
.single-product div.product .woocommerce-product-gallery__image img,
.single-product div.product .woocommerce-product-gallery__image a img {
	width: 100% !important; height: auto; aspect-ratio: 1 / 1; object-fit: contain;
	display: block;
}
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs { padding: 12px; gap: 8px; }

.single-product div.product .product_title { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.single-product div.product p.price { font-size: 30px; font-weight: 800; color: var(--pl-green); margin-bottom: 4px; }
.single-product div.product p.price small { font-size: 14px; font-weight: 500; color: var(--global-palette6); }
.single-product div.product .woocommerce-product-details__short-description ul { padding-left: 18px; }
.single-product div.product .woocommerce-product-details__short-description li { margin-bottom: 4px; }

.single-product div.product .stock.in-stock {
	display: inline-block; padding: 4px 12px; border-radius: 999px;
	background: #E8F5E9; color: var(--pl-green-dark); font-weight: 600; font-size: 13px;
}
.single-product div.product .stock.out-of-stock {
	display: inline-block; padding: 4px 12px; border-radius: 999px;
	background: #FFEBEE; color: #b82105; font-weight: 600; font-size: 13px;
}
.single-product div.product form.cart .single_add_to_cart_button { font-weight: 700; font-size: 16px; border-radius: 6px; }

/* Caixa de vantagens (Kadence "extras") */
.single-product .single-product-extras {
	background: var(--global-palette8); border: 1px solid var(--pl-border);
	border-radius: var(--pl-radius); padding: 18px 20px; margin: 20px 0;
}
.single-product .single-product-extras p { font-weight: 700; color: var(--pl-dark); margin: 0 0 8px; }
.single-product .single-product-extras ul { margin: 0; }
.single-product .single-product-extras .kadence-svg-iconset { color: var(--pl-green); }
.single-product .product_meta { font-size: 13px; color: var(--global-palette6); }

/* Separadores (Descrição do Produto / Envios e devoluções) — estilo sublinhado */
.woocommerce div.product .woocommerce-tabs { margin-top: 56px; }
.woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex; gap: 56px; margin: 0; padding: 0;
	border-bottom: 1px solid var(--pl-border); overflow-x: auto;
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background: none !important; border: 0 !important; border-radius: 0;
	margin: 0; padding: 0; box-shadow: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: block; padding: 0 0 14px; white-space: nowrap;
	font-size: 19px; font-weight: 500; color: var(--global-palette6);
	border-bottom: 2px solid transparent; margin-bottom: -1px;
	transition: color .2s, border-color .2s;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover { color: var(--pl-dark); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--global-palette3); border-bottom-color: var(--global-palette3);
}
.woocommerce div.product .woocommerce-tabs .panel {
	background: none; border: 0; border-radius: 0; box-shadow: none;
	padding: 36px 0 0; margin: 0;
	font-size: 16px; line-height: 1.8; color: var(--global-palette5);
}
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { display: none; }
.pl-tab-subtitle { font-size: 18px; margin: 32px 0 12px; color: var(--global-palette3); }
.pl-tab-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px; }
.pl-tab-links a { color: var(--pl-green); font-weight: 600; text-decoration: none; }
.woocommerce table.shop_attributes { border: 0; max-width: 640px; }
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	border: 0; border-bottom: 1px solid var(--pl-border); background: none !important;
	padding: 10px 0; font-style: normal;
}
.woocommerce table.shop_attributes th { width: 200px; font-weight: 600; color: var(--pl-dark); text-align: left; }
.woocommerce table.shop_attributes td p { margin: 0; }
@media (max-width: 600px) {
	.woocommerce div.product .woocommerce-tabs ul.tabs { gap: 28px; }
	.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-size: 16px; }
}

/* =========================================================
   Loja: barra lateral de filtros
   ========================================================= */
.woocommerce .primary-sidebar .widget,
.post-type-archive-product .primary-sidebar .widget,
.tax-product_cat .primary-sidebar .widget {
	background: #fff; border: 1px solid var(--pl-border);
	border-radius: var(--pl-radius); padding: 18px 20px; margin-bottom: 16px;
}
.primary-sidebar .widget-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; text-transform: none; letter-spacing: 0; }
.primary-sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.primary-sidebar .widget li { padding: 4px 0; display: flex; align-items: center; gap: 6px; text-align: left; }
.primary-sidebar .widget li .count { margin-left: auto; }
.primary-sidebar .widget li a { color: var(--pl-dark); text-decoration: none; }
.primary-sidebar .widget li.chosen a,
.primary-sidebar .widget li.current-cat > a { color: var(--pl-green); font-weight: 700; }
.primary-sidebar .widget .count { color: var(--global-palette6); font-size: 13px; }
.primary-sidebar .price_slider_wrapper .ui-slider .ui-slider-range,
.primary-sidebar .price_slider_wrapper .ui-slider .ui-slider-handle { background: var(--pl-green); }
.primary-sidebar .price_slider_amount .button { font-size: 13px; padding: 6px 14px; }

/* =========================================================
   Checkout: «Nome completo» em largura total
   ========================================================= */
.wc-block-components-address-form .wc-block-components-address-form__first_name { flex: 0 0 100%; width: 100%; margin-right: 0; }
.wc-block-components-address-form .wc-block-components-address-form__last_name { display: none; }

/* Telefone: bandeira de Portugal + prefixo +351 dentro do campo */
.wc-block-components-address-form__phone { position: relative; }
.wc-block-components-address-form__phone::before {
	content: "+351";
	position: absolute; left: 12px; top: 50%; transform: translateY(-50%); z-index: 1;
	display: flex; align-items: center;
	padding: 0 10px 0 32px; height: 26px;
	border-right: 1px solid var(--pl-border);
	font-size: 15px; font-weight: 600; color: var(--pl-dark); line-height: 1;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='12' height='20' fill='%23046A38'/%3E%3Crect x='12' width='18' height='20' fill='%23DA291C'/%3E%3Ccircle cx='12' cy='10' r='4.6' fill='none' stroke='%23FFE900' stroke-width='1.6'/%3E%3Cpath d='M10 7.2h4v3.6a2 2 0 0 1-4 0z' fill='%23fff' stroke='%23DA291C' stroke-width='.6'/%3E%3C/svg%3E") left center / 22px 15px no-repeat;
}
.wc-block-components-form .wc-block-components-address-form__phone input[type="tel"],
.wc-block-components-address-form__phone input[type="tel"] { padding-left: 108px !important; }
.wc-block-components-address-form__phone label { left: 108px !important; max-width: calc(100% - 120px); }

/* =========================================================
   Encomenda recebida: dados para transferência
   ========================================================= */
.pl-bank {
	background: #fff; border: 1px solid var(--pl-border); border-top: 4px solid var(--pl-green);
	border-radius: var(--pl-radius); padding: 28px 32px; margin: 8px 0 40px;
	box-shadow: var(--pl-shadow);
}
.pl-bank__title { font-size: 22px; margin: 0 0 8px; }
.pl-bank__intro { margin: 0 0 20px; color: var(--global-palette5); }
.pl-bank__list { margin: 0; display: grid; gap: 0; }
.pl-bank__row {
	display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 12px;
	padding: 12px 0; border-bottom: 1px solid var(--pl-border);
}
.pl-bank__row:last-child { border-bottom: 0; }
.pl-bank__row dt { font-weight: 600; color: var(--global-palette5); margin: 0; }
.pl-bank__row dd { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pl-bank__value { font-size: 16px; color: var(--pl-dark); word-break: break-all; }
.pl-bank__row.is-key .pl-bank__value { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pl-bank__copy {
	background: #fff; color: var(--pl-green); border: 1px solid var(--pl-green);
	border-radius: 6px; padding: 4px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.pl-bank__copy:hover { background: var(--pl-green); color: #fff; }
.pl-bank__note { margin: 18px 0 0; font-size: 14px; color: var(--global-palette6); }
@media (max-width: 600px) {
	.pl-bank { padding: 22px 18px; }
	.pl-bank__row { grid-template-columns: 1fr; gap: 4px; }
}

/* =========================================================
   Páginas legais / informativas
   ========================================================= */
.page .entry-content > h2.wp-block-heading { font-size: 22px; margin: 36px 0 10px; }
.page .entry-content > h2.wp-block-heading:first-of-type { margin-top: 8px; }
.pl-legal-note { font-size: 13px; color: var(--global-palette6); margin-bottom: 8px; }
.pl-legal-box {
	background: var(--global-palette8); border: 1px dashed var(--global-palette6);
	border-radius: var(--pl-radius); padding: 20px 24px; font-size: 15px;
}
.pl-legal-box p { margin: 0 0 8px; }
.pl-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 24px; }
.pl-contact-card {
	background: #fff; border: 1px solid var(--pl-border); border-top: 3px solid var(--pl-green);
	border-radius: var(--pl-radius); padding: 20px;
}
.pl-contact-card h3 { font-size: 16px; margin: 0 0 6px; }
.pl-contact-card p { margin: 0; font-size: 16px; font-weight: 600; color: var(--pl-dark); }
.pl-contact-card .pl-muted { font-size: 13px; font-weight: 400; color: var(--global-palette6); margin-top: 4px; }
.pl-contact-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 767px) { .pl-contact-grid, .pl-contact-grid--2 { grid-template-columns: 1fr; } }
.entry-content details.wp-block-details {
	background: #fff; border: 1px solid var(--pl-border); border-radius: var(--pl-radius);
	padding: 14px 20px; margin: 0 0 10px;
}
.entry-content details.wp-block-details summary { font-weight: 700; cursor: pointer; color: var(--pl-dark); }
.entry-content details.wp-block-details[open] summary { margin-bottom: 8px; color: var(--pl-green); }
.entry-content details.wp-block-details p { margin: 0; }

/* =========================================================
   Página Livro de Reclamações
   ========================================================= */
.pl-livro {
	display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
	background: #fff; border: 1px solid var(--pl-border); border-left: 4px solid #C62828;
	border-radius: var(--pl-radius); padding: 20px 24px; margin: 8px 0 32px;
	box-shadow: var(--pl-shadow);
}
.pl-livro__badge {
	width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0;
	display: grid; place-items: center; background: #FFEBEE; color: #C62828;
}
.pl-livro__body { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.pl-livro__body strong { font-size: 18px; color: var(--pl-dark); }
.pl-livro__body span { font-size: 14px; color: var(--global-palette6); }
.pl-livro__btn {
	background: #C62828; color: #fff !important; font-weight: 700; text-decoration: none;
	padding: 12px 22px; border-radius: 6px; transition: background .2s;
}
.pl-livro__btn:hover { background: #8E1B1B; }

/* =========================================================
   Rodapé
   ========================================================= */
/* Fundo: degradê anthracite com um toque de verde */
.site-footer {
	background:
		radial-gradient(1200px 500px at 85% 0%, rgba(46, 125, 50, .18), transparent 60%),
		linear-gradient(160deg, #1C2529 0%, #263238 55%, #1F2D27 100%);
	color: #B0BEC5;
}
.site-footer p { color: #B0BEC5; }
.site-footer a { color: #CFD8DC; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #81C784; }

/* Títulos das colunas */
.site-footer .widget-title {
	color: #fff; font-size: 17px; font-weight: 800;
	text-transform: none; letter-spacing: 0; margin-bottom: 22px;
}

/* Listas de links */
.site-footer .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget_nav_menu li { margin-bottom: 14px; font-size: 16px; }
.site-footer .pl-external > a::after { content: " \2197"; font-size: 13px; opacity: .7; }

/* Coluna marca */
.pl-fbrand { max-width: 440px; }
.pl-fbrand__logo { display: inline-flex; flex-direction: column; margin-bottom: 18px; }
.pl-fbrand__name { color: #fff; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.pl-fbrand__tag {
	color: #81C784; font-size: 12px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .2em; margin-top: 6px;
}
.pl-fbrand__desc { font-size: 15px; line-height: 1.75; margin: 0 0 22px; }
.pl-fcontact { list-style: none; margin: 0; padding: 0; }
.pl-fcontact li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 16px; }
.pl-fcontact svg { color: #81C784; flex-shrink: 0; }
.pl-fcontact a { color: #fff; }

/* Linha de baixo: morada · copyright · NIF */
.site-bottom-footer-wrap .site-footer-row-container-inner { border-top: 1px solid rgba(255, 255, 255, .08); }
@media (min-width: 1025px) {
	.site-middle-footer-inner-wrap.site-footer-row-columns-4 { grid-template-columns: 1.6fr 1fr 1fr 1fr; column-gap: 48px; }
}
.site-bottom-footer-wrap .footer-html-inner,
.site-bottom-footer-wrap .footer-html-inner > p {
	width: 100%; margin: 0;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 8px 24px; font-size: 14px; color: #90A4AE;
}
.site-bottom-footer-wrap .footer-html { width: 100%; }
.pl-fbottom__addr { display: inline-flex; align-items: center; gap: 8px; }
.pl-fbottom__addr svg { color: #81C784; }
.pl-fbottom__nif { color: #fff; font-weight: 700; letter-spacing: .02em; }

/* NIF bem visível na coluna da marca */
.pl-fcontact .pl-fcontact__nif { color: #fff; font-weight: 700; letter-spacing: .02em; }
.pl-fcontact .pl-fcontact__nif strong { color: #81C784; font-weight: 800; margin-right: 6px; }

@media (max-width: 767px) {
	.site-bottom-footer-wrap .footer-html-inner,
	.site-bottom-footer-wrap .footer-html-inner > p { flex-direction: column; text-align: center; }
	.site-footer .site-middle-footer-inner-wrap { row-gap: 32px; }
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 767px) {
	.pl-section { padding: 40px 16px; }
	.pl-hero { min-height: 540px !important; }
	.site-top-header-wrap .header-html-inner { flex-direction: column; gap: 0; }
}
