/*
Theme Name: Publitech Shop
Description: Tema WooCommerce per publitecheasy.it/shop/ – design del sito Publitech Easy.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: publitech-shop
*/

:root {
	--pe-primary: #CCD872;
	--pe-primary-soft: #DBDFB9;
	--pe-card: #D7DA9E;
	--pe-accent: #89D9D7;
	--pe-text: #222221;
	--pe-dark: #2B2A33;
	--pe-muted: #7F7D8E;
	--pe-light: #EFEFEF;
	--pe-pink: #FD3F6B;
	--pe-white: #FFFFFF;
	--pe-radius: 20px;
	--pe-font: "Lexend Deca", system-ui, -apple-system, "Segoe UI", sans-serif;
	--pe-wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--pe-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--pe-text);
	background: var(--pe-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.pe-wrap { max-width: var(--pe-wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header (как на publitecheasy.it) ---------- */
.pe-header { position: sticky; top: 0; z-index: 50; background: var(--pe-white); box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.pe-header__in { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.pe-logo img { width: 172px; height: auto; }
.pe-nav { margin-left: auto; }
.pe-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; }
.pe-nav li { border-left: 1px solid var(--pe-light); }
.pe-nav li:last-child { border-right: 1px solid var(--pe-light); }
.pe-nav a { display: block; padding: 18px 12px; font-size: 15px; text-decoration: none; white-space: nowrap; }
.pe-nav a:hover, .pe-nav .current a { color: #6f7a1c; }
.pe-nav .pe-nav__shop a { font-weight: 600; }
.pe-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.pe-burger span { display: block; height: 2px; background: var(--pe-text); margin: 5px 0; transition: transform .2s, opacity .2s; }
.pe-header.is-open .pe-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pe-header.is-open .pe-burger span:nth-child(2) { opacity: 0; }
.pe-header.is-open .pe-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1180px) {
	.pe-burger { display: block; }
	.pe-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--pe-white); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
	.pe-header.is-open .pe-nav { display: block; }
	.pe-nav ul { flex-direction: column; padding: 8px 0; }
	.pe-nav li, .pe-nav li:last-child { border: 0; border-top: 1px solid var(--pe-light); }
	.pe-nav a { padding: 14px 20px; }
}

/* ---------- hero ---------- */
.pe-hero { background: var(--pe-primary-soft); padding: 48px 0 40px; }
.pe-hero h1 { margin-bottom: .3em; }
.pe-hero p { max-width: 720px; margin: 0; color: var(--pe-dark); }
.pe-crumbs { font-size: 14px; color: var(--pe-muted); margin-bottom: 14px; }
.pe-crumbs a { text-decoration: none; }
.pe-crumbs a:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.pe-btn, .button, button.button, .woocommerce a.button, .woocommerce button.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 26px; border: 0; border-radius: 10px;
	background: var(--pe-text); color: var(--pe-white); font: 500 17px/1.1 var(--pe-font);
	text-decoration: none; cursor: pointer; transition: background .15s;
}
.pe-btn:hover, .button:hover { background: #000; color: var(--pe-white); }
.pe-btn--lime { background: var(--pe-primary); color: var(--pe-text); border: 1px solid #b9c45c; }
.pe-btn--lime:hover { background: #bfcc5e; color: var(--pe-text); }

/* ---------- main ---------- */
.pe-main { padding: 40px 0 72px; }

/* categorie (card come «Servizi easy») */
.pe-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0 0 40px; padding: 0; list-style: none; }
.pe-cats a { display: flex; flex-direction: column; justify-content: flex-end; min-height: 110px; padding: 20px; border-radius: var(--pe-radius); background: var(--pe-card); text-decoration: none; font-weight: 500; font-size: 18px; transition: transform .15s; }
.pe-cats a:hover { transform: translateY(-2px); }
.pe-cats li:nth-child(4n) a { background: var(--pe-accent); }
.pe-cats small { font-weight: 400; font-size: 14px; color: var(--pe-dark); }

/* griglia prodotti */
.woocommerce ul.products, ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { margin: 0 !important; width: auto !important; float: none !important; display: flex; flex-direction: column; border: 2px solid var(--pe-text); border-radius: 12px; padding: 14px; background: var(--pe-white); }
ul.products li.product a.woocommerce-LoopProduct-link { text-decoration: none; display: flex; flex-direction: column; flex: 1; }
ul.products li.product img { aspect-ratio: 1; object-fit: contain; width: 100%; background: #fafafa; border-radius: 8px; margin: 0 0 12px; }
ul.products li.product .woocommerce-loop-product__title { font-size: 17px; font-weight: 500; margin: 0 0 8px; padding: 0; }
ul.products li.product .price { display: inline-block; align-self: flex-start; margin-top: auto; padding: 3px 10px; border: 1.5px solid var(--pe-text); border-radius: 6px; font-weight: 600; font-size: 15px; color: var(--pe-text); }
ul.products li.product .pe-card-cta { margin-top: 12px; width: 100%; min-height: 42px; font-size: 15px; }
@media (max-width: 1024px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } ul.products li.product { padding: 10px; } ul.products li.product .woocommerce-loop-product__title { font-size: 15px; } }

.woocommerce-result-count { color: var(--pe-muted); font-size: 14px; margin: 0 0 16px; }
.woocommerce-ordering { margin: 0 0 20px; }
.woocommerce-ordering select { font: inherit; padding: 8px 12px; border: 1.5px solid var(--pe-text); border-radius: 8px; background: var(--pe-white); }
.woocommerce-pagination ul { display: flex; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; justify-content: center; }
.woocommerce-pagination a, .woocommerce-pagination span { display: block; min-width: 40px; padding: 8px 12px; text-align: center; border: 1.5px solid var(--pe-text); border-radius: 8px; text-decoration: none; }
.woocommerce-pagination .current { background: var(--pe-primary); }
.woocommerce-info, .woocommerce-message, .woocommerce-error { padding: 16px 20px; border-radius: 12px; background: var(--pe-light); list-style: none; margin: 0 0 24px; }

/* scheda prodotto */
.pe-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pe-product .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; position: relative; }
.pe-product .woocommerce-product-gallery img { border-radius: 16px; background: #fafafa; }
.pe-product .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.pe-product .flex-control-thumbs img { cursor: pointer; opacity: .6; border-radius: 8px; }
.pe-product .flex-control-thumbs img.flex-active { opacity: 1; }
.pe-summary .price { font-size: 28px; font-weight: 600; margin: 0 0 16px; color: var(--pe-text); }
.pe-summary .woocommerce-product-details__short-description { margin-bottom: 20px; }
.pe-facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.pe-facts li { padding-left: 28px; position: relative; }
.pe-facts li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--pe-primary); }
@media (max-width: 900px) { .pe-product { grid-template-columns: 1fr; gap: 24px; } }

/* modulo ordine rapido */
.pe-order { background: var(--pe-primary-soft); border-radius: var(--pe-radius); padding: 24px; margin: 0 0 24px; }
.pe-order h2 { font-size: 22px; margin-bottom: 6px; }
.pe-order p.pe-order__lead { font-size: 15px; color: var(--pe-dark); }
.pe-field { margin: 0 0 12px; }
.pe-field label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 4px; }
.pe-field input { width: 100%; min-height: 50px; padding: 12px 14px; font: 400 17px var(--pe-font); border: 1.5px solid var(--pe-text); border-radius: 10px; background: var(--pe-white); }
.pe-field input:focus { outline: 3px solid var(--pe-accent); outline-offset: 1px; }
.pe-field.has-error input { border-color: var(--pe-pink); }
.pe-field .pe-err { display: none; color: #c2183f; font-size: 13px; margin-top: 4px; }
.pe-field.has-error .pe-err { display: block; }
.pe-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pe-order .pe-btn { width: 100%; }
.pe-order__note { font-size: 13px; color: var(--pe-dark); margin: 10px 0 0; }
.pe-order__note a { text-decoration: underline; }
.pe-order__ok { background: var(--pe-white); border-radius: 12px; padding: 18px; }

/* sticky CTA mobile */
.pe-sticky { display: none; }
@media (max-width: 900px) {
	.pe-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 12px; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--pe-white); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
	.pe-sticky__price { font-weight: 600; font-size: 18px; white-space: nowrap; }
	.pe-sticky .pe-btn { flex: 1; }
	body.single-product { padding-bottom: 76px; }
}

/* tabs / contenuto */
.pe-content { max-width: 820px; }
.pe-content h2 { margin-top: 1.6em; }
.pe-content ul { padding-left: 22px; }
.pe-section { margin-top: 56px; }
.woocommerce-tabs .tabs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.woocommerce-tabs .tabs a { display: block; padding: 10px 18px; border: 1.5px solid var(--pe-text); border-radius: 10px; text-decoration: none; }
.woocommerce-tabs .tabs .active a { background: var(--pe-primary); }
.related > h2, .upsells > h2 { margin-bottom: 20px; }

/* pagine */
.pe-page { max-width: 820px; }
.pe-page h2 { margin-top: 1.6em; font-size: 22px; }
.pe-page ul { padding-left: 22px; }
.pe-page a { text-decoration-color: var(--pe-primary); text-decoration-thickness: 2px; }

/* ---------- footer (come publitecheasy.it) ---------- */
.pe-help { background: var(--pe-light); text-align: center; padding: 56px 0; }
.pe-help h2 { margin-bottom: 8px; }
.pe-help p { margin-bottom: 18px; }
.pe-footer { padding: 32px 0 24px; font-size: 14px; }
.pe-footer__logo { border-top: 1px solid var(--pe-light); border-bottom: 1px solid var(--pe-light); padding: 12px 0; margin-bottom: 20px; }
.pe-footer__logo img { width: 160px; }
.pe-footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pe-footer h3 { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
.pe-footer ul { list-style: none; margin: 0; padding: 0 0 0 6px; }
.pe-footer li { margin: 0 0 6px; }
.pe-footer a { text-decoration: none; }
.pe-footer a:hover { text-decoration: underline; }
.pe-footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; color: var(--pe-muted); font-size: 12px; }
.pe-footer__bottom a { text-decoration: underline; }
@media (max-width: 767px) { .pe-footer__cols { grid-template-columns: 1fr; } }

/* contenuti importati */
.pe-from { font-weight: 400; font-size: .8em; }
.pe-card-desc { font-size: 14px; color: var(--pe-dark); margin: 0 0 10px; line-height: 1.4; }
.pe-faq details { border: 1.5px solid var(--pe-text); border-radius: 12px; padding: 14px 18px; margin: 0 0 10px; }
.pe-faq summary { cursor: pointer; font-weight: 500; }
.pe-faq details[open] summary { margin-bottom: 8px; }
.pe-faq p { margin: 0; }
.pe-content li { margin-bottom: 6px; }

/* galleria: niente icona lente sulle foto */
.woocommerce-product-gallery__trigger { display: none !important; }
