/*
Theme Name: Favole & Racconti
Theme URI: https://www.favoleracconti.it
Author: Hydra Communication
Author URI: https://www.favoleracconti.it
Description: Tema WordPress one-page per il progetto editoriale "Le Avventure di FI, NO e CHIO" — landing con cielo dinamico (giorno/notte) e sezioni dedicate al libro, ai personaggi, agli eventi e agli sponsor.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: favole
Tags: one-page, custom-colors, custom-menu, translation-ready
*/

/* ═══ CUSTOM PROPERTIES ═══ */
:root{
  --font-display:'Bubblegum Sans',cursive;
  --font-body:'Nunito',sans-serif;
  --green-deep:#1B4332;
  --green-mid:#2D6A4F;
  --green-light:#52B788;
  --green-pale:#D8F3DC;
  --green-mint:#B7E4C7;
  --gold:#F4A261;
  --gold-dark:#D4882E;
  --orange:#E76F51;
  --white:#ffffff;
  --cream:#FEFAE0;
  --cream-soft:#FFF9E8;
  --text-dark:#1a1a1a;
  --text-body:#2d2d2d;
  --text-muted:#5a5a5a;
  --section-pad:clamp(30px,10vw,30px);
  --content-max:1100px;
  --radius-sm:12px;
  --radius-md:20px;
  --radius-lg:30px;
  --shadow-soft:rgba(0,0,0,.12);
  --shadow-mid:rgba(0,0,0,.2);
  --glass-bg:rgba(0,0,0,.35);
  --glass-border:rgba(255,255,255,.1);
  --glass-card:rgba(255,255,255,.08);
  --content-opacity:0.9;
}

/* ═══ RESET & BASE ═══ */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
body{width:100vw;min-height:100vh;font-family:var(--font-body);color:rgba(255,255,255,.9);overflow-x:hidden;background:linear-gradient(180deg,#0e1f3a 0%,#16324f 45%,#1B4332 100%);background-attachment:fixed}
html{scroll-behavior:smooth;scroll-padding-top:80px}
img{max-width:100%;height:auto;display:block}
a{color:rgba(255,255,255,.8);text-decoration-skip-ink:auto}
a:hover{color:var(--white)}

/* ═══ SKIP LINK ═══ */
.skip-link{position:absolute;top:-100%;left:16px;background:var(--green-deep);color:var(--white);padding:12px 24px;border-radius:0 0 12px 12px;z-index:10000;font-weight:700;text-decoration:none;transition:top .2s}
.skip-link:focus{top:0}

/* ═══ HEADER / NAV ═══ */
.site-header{position:fixed;top:0;left:0;right:0;z-index:1000;background:rgba(0,0,0,.35);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.12);transition:box-shadow .3s}
.site-header.scrolled{box-shadow:0 4px 20px rgba(0,0,0,.3)}
.nav-inner{max-width:1100px;margin:0 auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:68px}
.nav-logo{text-decoration:none;display:flex;align-items:center;height:100%}
.nav-logo img,
.nav-logo-img,
.nav-logo .custom-logo{max-height:100px;width:auto;height:auto;display:block; margin-top: 40px;;}
.nav-links{display:flex;gap:6px;list-style:none}
.nav-links a{font-family:var(--font-body);font-weight:600;font-size:.9rem;color:rgba(255,255,255,.85);text-decoration:none;padding:8px 18px;border-radius:50px;background:rgba(255,255,255,.15);transition:background .25s,color .25s}
.nav-links a:hover,.nav-links a:focus-visible{background:rgba(255,255,255,.28);color:var(--white)}
.nav-links a[aria-current="page"]{background:rgba(255,255,255,.28);color:var(--white)}
/* Menu a tendina */
.nav-links li{position:relative}
.nav-links .menu-item-has-children > a::after{content:'▾';margin-left:7px;font-size:.85em;display:inline-block;transition:transform .25s}
.nav-links .menu-item-has-children:hover > a::after,
.nav-links .menu-item-has-children:focus-within > a::after,
.nav-links .menu-item-has-children.open > a::after{transform:rotate(180deg)}
.nav-links .sub-menu{list-style:none;position:absolute;top:100%;left:0;margin-top:14px;min-width:210px;display:flex;flex-direction:column;gap:4px;padding:12px;background:rgba(0,0,0,.55);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.14);border-radius:18px;box-shadow:0 14px 34px rgba(0,0,0,.35);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .22s ease,transform .22s ease,visibility .22s;z-index:1001}
.nav-links .sub-menu::before{content:'';position:absolute;top:-14px;left:0;right:0;height:14px}
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu,
.nav-links li.open > .sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
.nav-links .sub-menu a{display:block;white-space:nowrap;background:transparent;border-radius:12px}
.nav-links .sub-menu a:hover,
.nav-links .sub-menu a:focus-visible{background:rgba(255,255,255,.18)}
.nav-toggle{display:none;background:none;border:2px solid rgba(255,255,255,.4);border-radius:12px;padding:8px 10px;cursor:pointer;color:rgba(255,255,255,.9);font-size:1.3rem;line-height:1}
@media(max-width:768px){
  .nav-toggle{display:block}
  .nav-links{display:none;position:absolute;top:68px;left:0;right:0;background:rgba(0,0,0,.5);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid rgba(255,255,255,.1);flex-direction:column;padding:16px 24px;gap:4px}
  .nav-links.open{display:flex}
  .nav-links a{display:block;padding:12px 16px;border-radius:12px;font-size:1rem}
  /* Sottomenu come accordion su mobile */
  .nav-links .sub-menu{position:static;opacity:1;visibility:visible;transform:none;display:none;min-width:0;margin:2px 0 6px 14px;padding:4px 0 4px 12px;background:transparent;border:none;border-left:2px solid rgba(255,255,255,.18);border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  .nav-links li.open > .sub-menu{display:flex}
  .nav-links .sub-menu::before{display:none}
  .nav-links .sub-menu a{background:rgba(255,255,255,.08);font-size:.95rem;padding:10px 14px}
}

.sky{position:fixed;inset:0;z-index:0;overflow:hidden}
.sky-gradient{position:absolute;inset:0;background:linear-gradient(180deg,#3888d0 0%,#58a8e0 33%,#80c4f0 66%,#a8dcf8 100%);transition:background 2s ease}
#stars-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1}

/* MOON */
.moon{position:absolute;z-index:2;width:clamp(40px,4vw,65px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 35%,#FFFDE7,#FFF9C4,#F0E68C);box-shadow:0 0 16px rgba(255,253,231,.5),0 0 50px rgba(255,249,196,.2);transition:opacity 2s,top 2s,left 2s}
.moon-c{position:absolute;border-radius:50%;background:rgba(200,190,140,.2)}
.moon-c:nth-child(1){width:18%;height:18%;top:28%;left:21%}
.moon-c:nth-child(2){width:13%;height:13%;top:50%;left:50%}
.moon-c:nth-child(3){width:9%;height:9%;top:20%;left:58%}

/* SUN */
.sun{position:absolute;z-index:3;width:clamp(50px,5vw,85px);aspect-ratio:1;border-radius:50%;transition:opacity 2s,bottom 2s,left 2s;opacity:0}
.sun-core{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 40% 40%,#FFF8E1,#FFECB3,#FFD54F,#FFB300);box-shadow:0 0 30px rgba(255,183,0,.5),0 0 70px rgba(255,183,0,.2)}
.sun-rays{position:absolute;inset:-60%;border-radius:50%;background:radial-gradient(circle,rgba(255,200,50,.1) 0%,transparent 70%);animation:sp 5s ease-in-out infinite}
@keyframes sp{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.12);opacity:1}}
.sun.low .sun-core{background:radial-gradient(circle at 40% 40%,#FFF8E1,#FFD54F,#FF9800,#E65100);box-shadow:0 0 40px rgba(255,120,0,.55),0 0 90px rgba(255,120,0,.25)}

/* HORIZON GLOW */
.horizon-glow{position:absolute;bottom:0;left:-10%;right:-10%;height:45%;z-index:2;opacity:0;transition:opacity 2s,background 2s;pointer-events:none}

/* CLOUDS — real SVG clouds, animated */
.cloud-layer{position:absolute;inset:0;z-index:5;overflow:hidden;pointer-events:none}
.cloud-item{position:absolute;will-change:transform;transition:opacity 3s ease}
.cloud-item img{display:block;width:100%;height:auto;filter:brightness(1)}

/* ═══════════════════════════════════
   LANDSCAPE — CSS positioned layers
   ═══════════════════════════════════ */
.land{position:fixed;bottom:0;left:0;right:0;z-index:10;pointer-events:none;height:38vh;min-height:220px;transition:filter 2s ease}

/* Hills — ALL layers span full .land height so no sky peeks through */
.land-hills{position:absolute;bottom:0;left:-2%;right:-2%;height:100%}
.land-hills svg{display:block;width:104%;height:100%}

/* Ground plane — covers the flat area where scene elements stand */
.ground-fill{position:absolute;bottom:0;left:0;right:0;height:clamp(55px,9vh,110px);background:#0d1a12;z-index:3}

/* Scene elements — sit on top of ground */
.scene-el{position:absolute;z-index:4;bottom:clamp(40px,7.5vh,92px);transition:filter 2s ease}

/* Element sizing with clamp for all resolutions */
.el-tree-big svg,.el-tree-big img{width:clamp(120px,12vw,240px);height:auto}
.el-tree-med svg,.el-tree-med img{width:clamp(85px,8.5vw,170px);height:auto}
.el-tree-sm svg,.el-tree-sm img{width:clamp(76px,7.6vw,152px);height:auto}
.el-house{position:absolute}
.el-house svg,.el-house img{width:clamp(600px,60vw,1200px);height:auto}
.win-glow{position:absolute;background:radial-gradient(ellipse,rgba(255,220,100,1) 0%,rgba(255,190,60,.8) 40%,rgba(255,150,30,.3) 70%,transparent 100%);border-radius:2px;opacity:0;transition:opacity 2s ease;pointer-events:none;box-shadow:0 0 18px 8px rgba(255,200,80,.5),0 0 40px 15px rgba(255,170,40,.25)}
.win-glow.win-big{background:radial-gradient(ellipse,rgba(255,220,100,.9) 0%,rgba(255,190,60,.6) 40%,rgba(255,150,30,.2) 70%,transparent 100%);box-shadow:0 0 25px 12px rgba(255,200,80,.45),0 0 60px 25px rgba(255,170,40,.2)}
.win-glow.win-mill{background:radial-gradient(ellipse,rgba(255,230,120,1) 0%,rgba(255,200,70,1) 40%,rgba(255,160,40,.6) 70%,transparent 100%);box-shadow:0 0 35px 16px rgba(255,210,90,.8),0 0 70px 30px rgba(255,180,50,.45)}
.el-fence svg{width:clamp(200px,22vw,450px);height:auto}
.el-cart svg{width:clamp(140px,14vw,280px);height:auto}
.el-pines svg{width:clamp(50px,5vw,100px);height:auto}
.el-tree-full svg,.el-tree-full img{width:25vw;height:auto}
.el-tree-mid svg,.el-tree-mid img{width:clamp(125px,12.5vw,250px);height:auto}
.el-bush svg{width:clamp(30px,3vw,60px);height:auto}

/* Positions — percentage based */
.el-tree-full.p0{left:-100px;z-index:10;bottom:calc(clamp(40px,7.5vh,92px) - 150px)}
.el-tree-big.p1{left:3%}
.el-tree-med.p2{left:10%}
.el-tree-sm.p3{left:16%}
.el-tree-mid.p35{left:calc(35% - 150px)}
.el-house{right:0;bottom:calc(clamp(40px,7.5vh,92px) - 100px)}
.el-fence{left:22%}
.el-cart{left:56%}
.el-tree-big.p4{left:calc(50% - 150px);transform:translateX(-50%);bottom:calc(clamp(40px,7.5vh,92px) - 25px)}
.el-pines{left:85%}
.el-tree-med.p5{left:92%}

/* Bushes scattered */
.el-bush.b1{left:1%}
.el-bush.b2{left:20%}
.el-bush.b3{left:50%}
.el-bush.b4{left:70%}
.el-bush.b5{left:90%}
.el-bush.b6{left:97%}

/* Fine-tune vertical alignment */
.el-fence{bottom:clamp(30px,6.5vh,72px)}
.el-bush{bottom:clamp(32px,6.8vh,75px)}

/* ═══ CLOCK ═══ */
.clock-overlay{position:fixed;top:18px;right:22px;z-index:100;text-align:right; z-index: 9999;}
.clock-time{font-family:Georgia,serif;font-size:clamp(1.6rem,3vw,2.8rem);font-weight:700;color:rgba(255,255,255,.82);text-shadow:0 2px 18px rgba(0,0,0,.4);line-height:1;letter-spacing:2px}
.clock-phase{font-family:'Segoe UI',sans-serif;font-size:clamp(.65rem,1vw,.85rem);color:rgba(255,255,255,.55);text-shadow:0 1px 6px rgba(0,0,0,.3);margin-top:3px;font-weight:500;letter-spacing:1px}
.clock-overlay.day .clock-time{color:rgba(30,50,80,.6);text-shadow:0 1px 8px rgba(255,255,255,.4)}
.clock-overlay.day .clock-phase{color:rgba(30,50,80,.45);text-shadow:none}

/* ═══ BOTTOM BAR ═══ */
.bar{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:100;display:flex;align-items:center;gap:clamp(6px,1vw,14px);background:rgba(0,0,0,.28);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);padding:9px clamp(12px,1.5vw,20px);border-radius:50px;border:1px solid rgba(255,255,255,.1);font-family:'Segoe UI',sans-serif; display: none;}
.bar-l{color:rgba(255,255,255,.6);font-size:.75rem;font-weight:600;white-space:nowrap}
.bar-b{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);color:rgba(255,255,255,.8);padding:5px 12px;border-radius:20px;font-size:.75rem;font-weight:700;cursor:pointer;transition:background .2s;white-space:nowrap}
.bar-b:hover{background:rgba(255,255,255,.16)}
.bar-b.on{background:rgba(255,213,79,.22);border-color:rgba(255,213,79,.45);color:#FFD54F}
.ts{-webkit-appearance:none;appearance:none;width:clamp(80px,12vw,200px);height:3px;border-radius:3px;background:rgba(255,255,255,.15);outline:none;cursor:pointer;opacity:.45;transition:opacity .3s;pointer-events:none}
.ts.act{opacity:1;pointer-events:auto}
.ts::-webkit-slider-thumb{-webkit-appearance:none;width:15px;height:15px;border-radius:50%;background:#FFD54F;cursor:pointer;box-shadow:0 0 5px rgba(255,213,79,.4)}
.ts::-moz-range-thumb{width:15px;height:15px;border-radius:50%;background:#FFD54F;cursor:pointer;border:none}
@media(max-width:600px){.bar-l{display:none}}

/* ═══════════════════════════════════════
   CONTENT LAYER — scrolls over sky
   ═══════════════════════════════════════ */
.hero,.section,.values-section,.section-divider,.site-footer{position:relative;z-index:20}

/* ═══ HERO ═══ */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0px 0px;
    width: 1100px;
    margin: 125px auto 35px;
}
.hero-inner{max-width:var(--content-max);width:100%;display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center}
.hero-text{animation:fadeSlideUp .8s ease both;background:rgba(0,0,0,var(--hero-bg,0));backdrop-filter:blur(calc(var(--hero-bg,0) * 20px));-webkit-backdrop-filter:blur(calc(var(--hero-bg,0) * 20px));padding:clamp(24px,3vw,45px);border-radius:var(--radius-lg);transition:background .8s ease}
@keyframes fadeSlideUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
.hero-badge{display:inline-block;background:var(--green-mid);color:var(--white);font-family:var(--font-display);font-size:.85rem;padding:6px 20px;border-radius:50px;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:18px}
.hero-title{font-family:var(--font-display);font-size: 2rem;line-height:1.1;color:var(--white);margin-bottom:10px;text-shadow:0 2px 20px rgba(0,0,0,.4)}
.hero-title .accent{color:var(--gold)}
.hero-subtitle{font-family:var(--font-display);font-size:clamp(1rem,2.5vw,1.3rem);color:var(--gold);margin-bottom:20px}
.hero-desc{font-size:1.05rem;color:rgba(255,255,255,.9);max-width:500px;margin-bottom:30px;line-height:1.8;text-shadow:0 1px 6px rgba(0,0,0,.4)}
.hero--full .hero-inner{grid-template-columns:1fr}
.hero--full .hero-content{max-width:none}
.hero-content{color:rgba(255,255,255,.9);max-width:500px;font-size:1.05rem;line-height:1.8;text-shadow:0 1px 6px rgba(0,0,0,.4)}
.hero-content > *{margin-bottom:18px}
.hero-content > *:last-child{margin-bottom:0}
.hero-content h2,.hero-content h3{font-family:var(--font-display);color:var(--gold);line-height:1.2}
.hero-content h2{font-size:clamp(1.2rem,3vw,1.6rem)}
.hero-content h3{font-size:clamp(1.05rem,2.4vw,1.3rem)}
.hero-content a:not(.btn){color:var(--gold);text-decoration:underline}
.hero-content ul,.hero-content ol{padding-left:1.3em}
.hero-content li{margin-bottom:6px}
.hero-content img{max-width:100%;height:auto;border-radius:var(--radius-md)}
.hero-content .wp-block-buttons{display:flex;gap:14px;flex-wrap:wrap;margin-top:24px}
.hero-actions{display:flex;gap:14px;flex-wrap:wrap}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:8px;padding:14px 28px;border-radius:50px;font-family:var(--font-body);font-weight:700;font-size:.95rem;text-decoration:none;border:none;cursor:pointer;transition:transform .2s,box-shadow .2s,background .2s;line-height:1.2}
.btn:hover{transform:translateY(-2px)}
.btn-primary{background:var(--green-mid);color:var(--white);box-shadow:0 6px 20px rgba(45,106,79,.4)}
.btn-primary:hover{background:var(--green-light);color:var(--white);box-shadow:0 8px 28px rgba(45,106,79,.5)}
.btn-secondary{background:rgba(255,255,255,.1);color:var(--white);border:2px solid rgba(255,255,255,.25);backdrop-filter:blur(8px)}
.btn-secondary:hover{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.4)}
.btn-gold{background:var(--gold);color:var(--green-deep);font-weight:800;box-shadow:0 6px 20px rgba(244,162,97,.4)}
.btn-gold:hover{background:var(--gold-dark);color:var(--white);box-shadow:0 8px 28px rgba(244,162,97,.5)}

.hero-cover{display:flex;justify-content:center;animation:fadeSlideUp .8s ease .2s both}
.hero-cover-img{width:min(380px,100%);border-radius:var(--radius-lg);box-shadow:0 20px 60px rgba(0,0,0,.35),0 0 0 4px rgba(255,255,255,.15);transition:transform .4s,box-shadow .4s}
.hero-cover-img:hover{transform:rotate(-1.5deg) scale(1.02);box-shadow:0 28px 70px rgba(0,0,0,.4),0 0 0 4px var(--gold)}
.hero-cover-placeholder{background:rgba(255,255,255,.08);border-radius:var(--radius-lg);aspect-ratio:3/4;display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-size:1.2rem;color:rgba(255,255,255,.5);border:3px dashed rgba(255,255,255,.2);text-align:center;padding:20px;width:min(380px,100%)}

@media(max-width:768px){
  .hero-inner{grid-template-columns:1fr;text-align:center;gap:36px}
  .hero-cover{order:-1}
  .hero-cover-img{width:min(280px,80vw)}
  .hero-desc{margin-left:auto;margin-right:auto}
  .hero-content{margin-left:auto;margin-right:auto}
  .hero-content .wp-block-buttons{justify-content:center}
  .hero-actions{justify-content:center}
}

/* ═══ CONTENT BOX (shared) ═══ */
.content-box{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-radius:var(--radius-lg);padding:clamp(28px,4vw,48px);border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .5));box-shadow:0 8px 32px rgba(0,0,0,.1);transition:background .8s ease}

/* ═══ SECTION SHARED ═══ */
.section{padding:var(--section-pad) 24px}
.section-inner{max-width:var(--content-max);margin:0 auto}
.section-label{font-family:var(--font-display);font-size:.85rem;color:var(--orange);text-transform:uppercase;letter-spacing:2px;margin-bottom:8px;display:block}
.section-title{font-family:var(--font-display);font-size:2rem;color:var(--green-deep);margin-bottom:16px;line-height:1.2}
.section-desc{font-size:1.05rem;color:var(--text-muted);max-width:640px;line-height:1.8;margin-bottom:40px}

.section-divider{display:flex;align-items:center;justify-content:center;gap:16px;padding:0 24px}
.section-divider::before,.section-divider::after{content:'';flex:1;max-width:200px;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent)}
.section-divider span{font-size:1.4rem}

/* ═══ VALUES ═══ */
.values-section{padding:50px 24px}
.values-grid{max-width:var(--content-max);margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.value-card{text-align:center;padding:24px 16px;background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:var(--radius-md);border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:background .8s ease,transform .3s}
.value-card:hover{transform:translateY(-4px)}
.value-icon{font-size:2.4rem;margin-bottom:12px;display:block}
.value-title{font-family:var(--font-display);font-size:1.2rem;margin-bottom:6px;color:var(--green-deep)}
.value-desc{font-size:.88rem;color:var(--text-muted);line-height:1.6}
@media(max-width:768px){.values-grid{grid-template-columns:1fr 1fr;gap:20px}}
@media(max-width:480px){.values-grid{grid-template-columns:1fr}}

/* ═══ GLASS CARD (shared) ═══ */
.glass-card{background:var(--glass-bg);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--glass-border);border-radius:var(--radius-lg);box-shadow:0 8px 32px rgba(0,0,0,.2)}

/* ═══ IL LIBRO ═══ */
.libro-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:50px;align-items:center}
.libro-image-wrap{position:relative}
.libro-image-placeholder{background:rgba(255,255,255,.3);border-radius:var(--radius-lg);aspect-ratio:3/4;display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-size:1.2rem;color:var(--text-muted);border:3px dashed rgba(0,0,0,.15);text-align:center;padding:20px}
.libro-details{display:flex;flex-direction:column;gap:20px}
.libro-specs{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px}
.spec-badge{background:var(--green-deep);color:var(--white);font-size:.82rem;font-weight:700;padding:6px 16px;border-radius:50px}
.libro-format-cards{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:10px}
.format-card{background:rgba(255,255,255,.5);border-radius:var(--radius-md);padding:20px;border:1px solid rgba(0,0,0,.08);transition:transform .3s,box-shadow .3s}
.format-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,.12)}
.format-icon{font-size:2rem;margin-bottom:8px;display:block}
.format-title{font-family:var(--font-display);font-size:1.1rem;color:var(--green-deep);margin-bottom:4px}
.format-desc{font-size:.85rem;color:var(--text-muted);line-height:1.6}
@media(max-width:768px){.libro-grid{grid-template-columns:1fr;gap:30px}.libro-format-cards{grid-template-columns:1fr}}

/* ═══ PERSONAGGI ═══ */
.personaggi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-bottom:40px}
.char-card{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:var(--radius-lg);padding:36px 24px 28px;text-align:center;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:transform .3s,box-shadow .3s,border-color .3s,background .8s ease;position:relative;overflow:hidden}
.char-card::before{content:'';position:absolute;top:0;left:0;right:0;height:6px}
.char-card--fi::before{background:var(--green-deep)}
.char-card--no::before{background:#6B4226}
.char-card--chio::before{background:var(--orange)}
.char-card:hover{transform:translateY(-8px);box-shadow:0 18px 50px rgba(0,0,0,.15)}
.char-card--fi:hover{border-color:var(--green-deep)}
.char-card--no:hover{border-color:#6B4226}
.char-card--chio:hover{border-color:var(--orange)}
.char-emoji{font-size:3.4rem;margin-bottom:12px;display:block}
.char-name{font-family:var(--font-display);font-size:2.2rem;margin-bottom:4px;display:block}
.char-name--fi{color:var(--green-deep)}
.char-name--no{color:#6B4226}
.char-name--chio{color:var(--orange)}
.char-trait{font-size:.82rem;font-weight:700;color:var(--green-mid);text-transform:uppercase;letter-spacing:1px;margin-bottom:14px;display:block}
.char-desc{font-size:.92rem;color:var(--text-muted);line-height:1.7}
.side-chars{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.side-char{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:var(--radius-md);padding:20px 22px;display:flex;align-items:center;gap:16px;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:transform .2s,background .8s ease}
.side-char:hover{transform:translateX(4px)}
.side-char-emoji{font-size:2.2rem;flex-shrink:0}
.side-char-name{font-family:var(--font-display);font-size:1.1rem;color:var(--green-deep)}
.side-char-desc{font-size:.85rem;color:var(--text-muted);line-height:1.5}
@media(max-width:768px){.personaggi-grid{grid-template-columns:1fr;max-width:380px;margin-left:auto;margin-right:auto}.side-chars{grid-template-columns:1fr}}

/* ═══ AUTORE ═══ */
.autore-card{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-radius:var(--radius-lg);padding:48px 42px;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));border-left:6px solid var(--gold);transition:background .8s ease}
.autore-card p{font-size:1.05rem;line-height:1.9;color:var(--text-body);margin-bottom:16px}
.autore-card p:last-child{margin-bottom:0}
.autore-sign{font-family:var(--font-display);font-size:1.3rem;color:var(--green-deep);margin-top:20px}
@media(max-width:600px){.autore-card{padding:28px 22px}}

/* ═══ EVENTI ═══ */
.eventi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.evento-card{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:var(--radius-md);overflow:hidden;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:transform .3s,box-shadow .3s,background .8s ease}
.evento-card:hover{transform:translateY(-6px);box-shadow:0 16px 40px rgba(0,0,0,.12)}
.evento-top{background:rgba(0,0,0,.04);padding:32px 20px;text-align:center}
.evento-icon{font-size:2.6rem}
.evento-body{padding:22px 20px}
.evento-title{font-family:var(--font-display);font-size:1.2rem;color:var(--green-deep);margin-bottom:8px}
.evento-desc{font-size:.9rem;color:var(--text-muted);line-height:1.7}
@media(max-width:768px){.eventi-grid{grid-template-columns:1fr;max-width:420px;margin-left:auto;margin-right:auto}}

/* ═══ SPONSOR ═══ */
.sponsor-cta-card{background:linear-gradient(135deg,var(--green-deep),var(--green-mid));border-radius:var(--radius-lg);padding:56px 42px;text-align:center;color:var(--white);box-shadow:0 16px 50px rgba(27,67,50,.3)}
.sponsor-cta-title{font-family:var(--font-display);font-size:clamp(1.6rem,4vw,2.4rem);margin-bottom:16px}
.sponsor-cta-desc{font-size:1.05rem;opacity:.92;max-width:560px;margin:0 auto 28px;line-height:1.8}

/* ═══ CONTATTI ═══ */
.contatti-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:start}
.contatti-info{display:flex;flex-direction:column;gap:20px;background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:var(--radius-lg);padding:30px;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:background .8s ease}
.contatto-item{display:flex;align-items:flex-start;gap:14px}
.contatto-icon{font-size:1.6rem;flex-shrink:0;width:48px;height:48px;background:rgba(255,255,255,var(--content-opacity));border-radius:50%;display:flex;align-items:center;justify-content:center}
.contatto-label{font-weight:700;color:var(--green-deep);font-size:.9rem;margin-bottom:2px}
.contatto-value{font-size:.95rem;color:var(--text-body)}
.contatto-value a{color:var(--green-mid);text-decoration:none}
.contatto-value a:hover{color:var(--green-deep)}
.contact-form{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-radius:var(--radius-lg);padding:36px 30px;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:background .8s ease}
.form-group{margin-bottom:18px}
.form-group label{display:block;font-weight:700;font-size:.88rem;color:var(--green-deep);margin-bottom:6px}
.form-group .required{color:var(--orange)}
.form-group input,.form-group textarea,.form-group select{width:100%;padding:12px 16px;border:2px solid rgba(0,0,0,.1);border-radius:var(--radius-sm);font-family:var(--font-body);font-size:.95rem;color:var(--text-body);background:rgba(255,255,255,.5);transition:border-color .2s,box-shadow .2s}
.form-group input:focus,.form-group textarea:focus,.form-group select:focus{border-color:var(--green-light);box-shadow:0 0 0 3px rgba(82,183,136,.2);outline:none}
.form-group textarea{min-height:120px;resize:vertical}
.form-group input::placeholder,.form-group textarea::placeholder{color:#999}
/* Contact Form 7 nella sezione contatti: stesso aspetto del form del tema. */
.contatti-section .wpcf7{background:rgba(255,255,255,var(--content-opacity));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-radius:var(--radius-lg);padding:36px 30px;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4))}
.contatti-section .wpcf7-form p{margin:0 0 18px}
.contatti-section .wpcf7-form label{display:block;font-weight:700;font-size:.88rem;color:var(--green-deep)}
.contatti-section .wpcf7-form-control-wrap{display:block;margin-top:6px}
.contatti-section .wpcf7 input.wpcf7-form-control:not(.wpcf7-submit),
.contatti-section .wpcf7 textarea.wpcf7-form-control,
.contatti-section .wpcf7 select.wpcf7-form-control{width:100%;padding:12px 16px;border:2px solid rgba(0,0,0,.1);border-radius:var(--radius-sm);font-family:var(--font-body);font-size:.95rem;color:var(--text-body);background:rgba(255,255,255,.5);transition:border-color .2s,box-shadow .2s}
.contatti-section .wpcf7 input.wpcf7-form-control:not(.wpcf7-submit):focus,
.contatti-section .wpcf7 textarea.wpcf7-form-control:focus,
.contatti-section .wpcf7 select.wpcf7-form-control:focus{border-color:var(--green-light);box-shadow:0 0 0 3px rgba(82,183,136,.2);outline:none}
.contatti-section .wpcf7 textarea.wpcf7-form-control{min-height:120px;resize:vertical}
.contatti-section .wpcf7 input::placeholder,
.contatti-section .wpcf7 textarea::placeholder{color:#999}
.contatti-section .wpcf7-submit{display:block;width:100%;background:var(--green-mid);color:var(--white);font-family:var(--font-body);font-weight:800;border:none;border-radius:50px;padding:14px 30px;font-size:1rem;cursor:pointer;transition:background .25s,box-shadow .25s;box-shadow:0 6px 20px rgba(45,106,79,.35)}
.contatti-section .wpcf7-submit:hover{background:var(--green-light);box-shadow:0 8px 28px rgba(45,106,79,.45)}
.contatti-section .wpcf7 .wpcf7-not-valid-tip{color:var(--orange);font-size:.82rem;margin-top:4px}
.contatti-section .wpcf7-response-output{border-radius:var(--radius-sm);margin:14px 0 0;padding:12px 16px;font-size:.9rem;color:var(--text-body)}
.contatti-section .wpcf7 .wpcf7-spinner{margin:0 0 0 8px}
@media(max-width:768px){.contatti-grid{grid-template-columns:1fr}.contact-form{padding:26px 20px}}

/* ═══ FOOTER ═══ */
.site-footer{background:rgba(0,0,0,.55);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);padding:50px 24px 30px;border-top:1px solid rgba(255,255,255,.1)}
.footer-inner{max-width:var(--content-max);margin:0 auto;display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px;margin-bottom:36px}
.footer-brand{font-family:var(--font-display);font-size:1.5rem;color:var(--white);margin-bottom:12px}
.footer-tagline{font-size:.9rem;opacity:.65;line-height:1.6;max-width:320px}
.footer-heading{font-family:var(--font-display);font-size:1rem;color:var(--gold);margin-bottom:14px}
.footer-links{list-style:none;display:flex;flex-direction:column;gap:8px}
.footer-links a{color:rgba(255,255,255,.6);text-decoration:none;font-size:.9rem;transition:color .2s}
.footer-links a:hover{color:var(--white)}
.footer-bottom{max-width:var(--content-max);margin:0 auto;border-top:1px solid rgba(255,255,255,.1);padding-top:20px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;font-size:.82rem;opacity:.55}
@media(max-width:768px){.footer-inner{grid-template-columns:1fr;gap:28px}}

/* ═══ SCROLL REVEAL ═══ */
.reveal{opacity:0;transform:translateY(24px);transition:opacity .7s ease,transform .7s ease}
.reveal.visible{opacity:1;transform:translateY(0)}

/* ═══ PERSONAGGI — immagini (CPT) ═══ */
.char-img{width:120px;height:120px;object-fit:cover;border-radius:50%;margin:0 auto 14px;display:block;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.side-char-img{width:56px;height:56px;object-fit:cover;border-radius:50%;flex-shrink:0}

/* ═══ WOOCOMMERCE ═══ */
.woocommerce-section{padding-top:calc(68px + var(--section-pad))}
.woocommerce-section .content-box .woocommerce{color:var(--text-body)}
.woocommerce-section .product_title,
.woocommerce-section h1,
.woocommerce-section h2{font-family:var(--font-display);color:var(--green-deep);line-height:1.2}
.woocommerce-section .price,
.woocommerce-section .woocommerce-Price-amount{color:var(--green-deep);font-weight:800}
.woocommerce-section .woocommerce-tabs ul.tabs li a{color:var(--green-mid)}
.woocommerce-section a.button,
.woocommerce-section button.button,
.woocommerce-section .woocommerce a.button.alt,
.woocommerce-section .woocommerce button.button.alt{background:var(--green-mid);color:var(--white);font-family:var(--font-body);font-weight:700;border-radius:50px;padding:12px 28px}
.woocommerce-section a.button:hover,
.woocommerce-section button.button:hover{background:var(--green-light)}
.woocommerce-section .woocommerce-message,
.woocommerce-section .woocommerce-info{border-top-color:var(--green-light)}
.woocommerce-section ul.products li.product .price{color:var(--green-deep)}
/* Le sezioni editoriali ACF ereditano lo stile esistente delle card */
.woocommerce-section .valori-section,
.woocommerce-section .personaggi-section,
.woocommerce-section .autore-section,
.woocommerce-section .libro-section{padding-left:0;padding-right:0}

/* ═══ WOOCOMMERCE — scheda prodotto personalizzata ═══ */
/* Hero prodotto: testo metà spazio, immagine l'altra metà */
.favole-product-wrap .hero-inner{max-width:1500px;grid-template-columns:1fr 1fr;gap:48px;align-items:center}
.favole-product-wrap .summary{float:none;width:auto}
.favole-product-wrap .hero-text{width:100%;max-width:none}
.favole-product-wrap .hero-desc{max-width:none;color:rgba(255,255,255,.92)}
.favole-product-wrap .hero-desc *{color:rgba(255,255,255,.92) !important}
.favole-product-wrap .hero-desc h1,
.favole-product-wrap .hero-desc h2,
.favole-product-wrap .hero-desc h3,
.favole-product-wrap .hero-desc strong{color:#fff !important}
.favole-product-wrap .hero-desc a{color:var(--gold) !important;text-decoration:underline}
.favole-product-wrap .hero-cover{position:relative;display:block;width:100%;justify-content:initial}
.favole-product-wrap .hero-cover-img,
.favole-product-wrap .hero-cover-placeholder{width:100%;max-width:none}
.favole-product-wrap .hero-cover-placeholder{aspect-ratio:4/3}
@media(max-width:768px){.favole-product-wrap .hero-inner{grid-template-columns:1fr}}
.favole-product-wrap .onsale{position:absolute;top:14px;left:14px;background:var(--gold);color:var(--green-deep);font-family:var(--font-display);padding:6px 16px;border-radius:50px;z-index:5}
.favole-product-wrap .hero-desc > * + *{margin-top:14px}
.favole-product-wrap .hero-actions{align-items:center;gap:18px}
.favole-product-wrap .product-price{font-family:var(--font-display);font-size:clamp(1.4rem,3.5vw,2.1rem);color:var(--gold);text-shadow:0 1px 6px rgba(0,0,0,.4)}
.favole-product-wrap .product-price del{opacity:.55;font-size:.7em;margin-right:10px}
.favole-product-wrap .product-price ins{text-decoration:none}
.favole-product-wrap .cart{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:0}
.favole-product-wrap .cart .quantity input{width:80px;padding:12px;border-radius:var(--radius-sm);border:2px solid rgba(255,255,255,.25);background:rgba(255,255,255,.12);color:var(--white);font-family:var(--font-body);font-weight:700}
.favole-product-wrap .cart .button,
.favole-product-wrap .single_add_to_cart_button{background:var(--gold);color:var(--green-deep);font-family:var(--font-body);font-weight:800;border:none;border-radius:50px;padding:14px 30px;font-size:1rem;cursor:pointer;box-shadow:0 6px 20px rgba(244,162,97,.4);transition:background .25s,box-shadow .25s}
.favole-product-wrap .cart .button:hover,
.favole-product-wrap .single_add_to_cart_button:hover{background:var(--gold-dark);color:var(--white);box-shadow:0 8px 28px rgba(244,162,97,.5)}
.favole-product-wrap .woocommerce-message,
.favole-product-wrap .woocommerce-info,
.favole-product-wrap .woocommerce-error{list-style:none;background:rgba(0,0,0,.35);backdrop-filter:blur(12px);border-radius:var(--radius-md);border:1px solid rgba(255,255,255,.15);color:var(--white);padding:16px 22px;margin:0 24px 20px}
.favole-product-wrap .woocommerce-message a,
.favole-product-wrap .woocommerce-info a{color:var(--gold)}
.favole-product-related h2{font-family:var(--font-display);color:var(--green-deep);margin-bottom:24px}
.favole-product-related ul.products{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:20px;padding:0}
.favole-product-related ul.products li.product{text-align:center}
.favole-product-related ul.products li.product img{border-radius:var(--radius-md);margin-bottom:10px}
.favole-product-related ul.products li.product .woocommerce-loop-product__title{font-family:var(--font-display);font-size:1rem;color:var(--green-deep);padding:0 0 4px}
.favole-product-related ul.products li.product .price{color:var(--green-deep);font-weight:800;display:block;margin-bottom:10px}
.favole-product-related ul.products li.product a.button{background:var(--green-mid);color:var(--white);border-radius:50px;padding:10px 22px;font-weight:700;display:inline-block}
.favole-product-related ul.products li.product a.button:hover{background:var(--green-light)}
@media(max-width:900px){.favole-product-related ul.products{grid-template-columns:1fr 1fr}}
@media(max-width:768px){.favole-product-wrap .hero--product .hero-inner{grid-template-columns:1fr;text-align:left}.favole-product-wrap .hero-cover{order:-1}}
@media(max-width:480px){.favole-product-related ul.products{grid-template-columns:1fr}}

/* Categoria prodotto: stesso hero del singolo, ma cover quadrata e centrata
   (le miniature di categoria sono di solito immagini quadrate, non copertine 4/3) */
.favole-category-wrap .hero-cover{display:flex;justify-content:center;align-items:center}
.favole-category-wrap .hero-cover-img{width:min(380px,100%);max-width:380px;aspect-ratio:1;object-fit:cover;border-radius:var(--radius-lg);box-shadow:0 20px 60px rgba(0,0,0,.35),0 0 0 4px rgba(255,255,255,.15)}
.favole-category-wrap .hero-cover-placeholder{width:min(380px,100%);max-width:380px;aspect-ratio:1;border-radius:var(--radius-lg)}
.favole-category-wrap .woocommerce-products-header,
.favole-category-wrap .woocommerce-products-header__title{display:none}

/* La griglia delle categorie prodotto usa le stesse regole flex dello shop
   (vedi sezione "WOOCOMMERCE — shop / archivio"): 3 per riga, allineata a
   sinistra, con singolo prodotto a sinistra. */

/* ═══ WOOCOMMERCE — shop / archivio ═══ */
.woocommerce-archive .woocommerce-products-header__title,
.woocommerce-archive .page-title{font-family:var(--font-display);font-size:clamp(2rem,5vw,3rem);color:var(--white);text-shadow:0 2px 18px rgba(0,0,0,.4);margin-bottom:14px}
.woocommerce-archive .term-description,
.woocommerce-archive .woocommerce-products-header{color:rgba(255,255,255,.85);max-width:680px;line-height:1.7;margin-bottom:26px}
.woocommerce-archive .woocommerce-result-count{color:rgba(255,255,255,.6);font-size:.9rem}
.woocommerce-archive .woocommerce-ordering{margin-bottom:24px}
.woocommerce-archive .woocommerce-ordering select{padding:10px 16px;border-radius:50px;border:1px solid rgba(0,0,0,.12);background:rgb(244,162,97);color:var(--white);font-family:var(--font-body);font-weight:600}
/* Le opzioni del menu a tendina usano il rendering nativo (sfondo chiaro):
   forza testo scuro per evitare bianco-su-bianco. */
.woocommerce-archive .woocommerce-ordering select option{color:var(--text-body);background:#fff}
/* Griglia shop e categorie prodotto a 3 per riga, allineata a sinistra
   (flex-wrap: con un solo prodotto resta in alto a sinistra invece di
   centrarsi). Neutralizza i float/width inline di WooCommerce su .columns-N. */
.woocommerce-archive ul.products,
.favole-product-wrap.favole-category-wrap ul.products{display:flex !important;flex-wrap:wrap;justify-content:flex-start;gap:24px;list-style:none;padding:0;margin:0 0 40px;width:100%;float:none}
.woocommerce-archive ul.products li.product,
.favole-product-wrap.favole-category-wrap ul.products li.product{width:calc((100% - 48px) / 3) !important;max-width:none !important;margin:0 !important;float:none !important;clear:none !important;min-width:0}
.favole-card{display:flex;flex-direction:column;background:rgba(255,255,255,var(--content-opacity));border-radius:var(--radius-md);overflow:hidden;border:1px solid rgba(255,255,255,calc(var(--content-opacity) * .4));transition:transform .3s,box-shadow .3s;position:relative}
.favole-card:hover{transform:translateY(-6px);box-shadow:0 18px 44px rgba(0,0,0,.18)}
.favole-card-media{display:block;position:relative;overflow:hidden}
.favole-card-media img{width:100%;aspect-ratio:1;object-fit:cover;display:block;transition:transform .4s}
.favole-card:hover .favole-card-media img{transform:scale(1.04)}
.favole-card .onsale{position:absolute;top:12px;left:12px;background:var(--gold);color:var(--green-deep);font-family:var(--font-display);font-size:.8rem;padding:5px 14px;border-radius:50px;z-index:2}
.favole-card-body{padding:22px 20px;display:flex;flex-direction:column;gap:8px;flex:1}
.favole-card-title{font-family:var(--font-display);font-size:1.2rem;line-height:1.25}
.favole-card-title a{color:var(--green-deep);text-decoration:none}
.favole-card-title a:hover{color:var(--green-mid)}
.favole-card-desc{font-size:.88rem;color:var(--text-muted);line-height:1.6}
.favole-card-price{font-family:var(--font-display);font-size:1.25rem;color:var(--green-deep);font-weight:800}
.favole-card-price del{opacity:.5;font-weight:400;font-size:.8em;margin-right:8px}
.favole-card-price ins{text-decoration:none}
.favole-card .button,
.favole-card .added_to_cart{margin-top:auto;display:inline-block;text-align:center;background:var(--gold);color:var(--green-deep);font-family:var(--font-body);font-weight:800;border:none;border-radius:50px;padding:12px 24px;font-size:.92rem;cursor:pointer;text-decoration:none;transition:background .25s}
.favole-card .button:hover,
.favole-card .added_to_cart:hover{background:var(--gold-dark);color:var(--white)}
.favole-card .added_to_cart{margin-top:10px;background:transparent;color:var(--green-deep);text-decoration:underline;padding:4px}
/* CTA "Vedi la pubblicazione": testo bianco anche in hover/focus (vince sul
   color verde-scuro ereditato dai link WooCommerce in hover). */
.favole-card a.favole-card-cta:hover,
.favole-card a.favole-card-cta:focus{color:var(--white) !important}
.woocommerce-archive nav.woocommerce-pagination ul{list-style:none;display:flex;gap:8px;justify-content:center;padding:0}
.woocommerce-archive nav.woocommerce-pagination a,
.woocommerce-archive nav.woocommerce-pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.12);color:var(--white);text-decoration:none;font-weight:700}
.woocommerce-archive nav.woocommerce-pagination span.current{background:var(--gold);color:var(--green-deep)}
.woocommerce-archive nav.woocommerce-pagination a:hover{background:rgba(255,255,255,.25)}
@media(max-width:768px){.woocommerce-archive ul.products li.product,
.favole-product-wrap.favole-category-wrap ul.products li.product{width:calc((100% - 24px) / 2) !important}}
@media(max-width:480px){.woocommerce-archive ul.products li.product,
.favole-product-wrap.favole-category-wrap ul.products li.product{width:100% !important}}

/* ═══ WOOCOMMERCE — header archivio/categoria ═══ */
.shop-hero{padding:calc(68px + 4px) 24px 4px}
/* L'hero scavalca già l'header fisso: la sezione prodotti che segue non deve
   riaggiungere l'offset di 68px (evita il grande vuoto sopra la griglia). */
.woocommerce-archive{padding-top:8px}
.shop-hero-inner{max-width:var(--content-max);margin:0 auto;display:flex;align-items:center;gap:36px}
.shop-hero--has-img .shop-hero-inner{justify-content:flex-start}
.shop-hero:not(.shop-hero--has-img) .shop-hero-inner{flex-direction:column;text-align:center}
.shop-hero-media{flex-shrink:0}
.shop-hero-img{width:160px;height:160px;object-fit:cover;border-radius:50%;box-shadow:0 16px 44px rgba(0,0,0,.35),0 0 0 4px rgba(255,255,255,.15)}
.shop-hero-text .section-label{color:var(--gold)}
.shop-hero-title{font-family:var(--font-display);font-size:clamp(2.2rem,6vw,3.4rem);color:var(--white);text-shadow:0 2px 20px rgba(0,0,0,.4);margin:6px 0 12px}
.shop-hero-desc{color:rgba(255,255,255,.85);font-size:1.05rem;line-height:1.8;max-width:620px}
.shop-hero:not(.shop-hero--has-img) .shop-hero-desc{margin:0 auto}
@media(max-width:768px){.shop-hero-inner{flex-direction:column;text-align:center;gap:20px}.shop-hero--has-img .shop-hero-inner{align-items:center}.shop-hero-desc{margin:0 auto}}

/* ═══ WOOCOMMERCE — carrello / checkout / account ═══ */
.woocommerce-section .content-box{color:var(--text-body)}
.woocommerce-section .content-box h1,
.woocommerce-section .content-box h2,
.woocommerce-section .content-box h3{font-family:var(--font-display);color:var(--green-deep)}
.woocommerce-section table.shop_table,
.woocommerce-section .cart-collaterals .cart_totals table{border:1px solid rgba(0,0,0,.08);border-radius:var(--radius-md);border-collapse:separate;border-spacing:0;overflow:hidden;width:100%}
.woocommerce-section table.shop_table th,
.woocommerce-section table.shop_table td{padding:14px 16px;border-bottom:1px solid rgba(0,0,0,.06);text-align:left}
.woocommerce-section table.shop_table thead th{background:var(--green-deep);color:var(--white);font-family:var(--font-body)}
.woocommerce-section .cart_item:hover{background:rgba(0,0,0,.02)}
.woocommerce-section .coupon input,
.woocommerce-section form .form-row input.input-text,
.woocommerce-section form .form-row textarea,
.woocommerce-section form .form-row select,
.woocommerce-section .quantity input{padding:12px 14px;border:2px solid rgba(0,0,0,.12);border-radius:var(--radius-sm);font-family:var(--font-body);font-size:.95rem;background:#fff;color:var(--text-body);width:100%}
.woocommerce-section .quantity input{width:80px}
.woocommerce-section form .form-row input.input-text:focus,
.woocommerce-section form .form-row textarea:focus,
.woocommerce-section form .form-row select:focus{border-color:var(--green-light);outline:none;box-shadow:0 0 0 3px rgba(82,183,136,.2)}
.woocommerce-section .button,
.woocommerce-section button.button,
.woocommerce-section input.button,
.woocommerce-section #place_order,
.woocommerce-section .checkout-button{background:var(--green-mid);color:var(--white);font-family:var(--font-body);font-weight:800;border:none;border-radius:50px;padding:13px 30px;font-size:1rem;cursor:pointer;transition:background .25s,box-shadow .25s;box-shadow:0 6px 20px rgba(45,106,79,.35)}
.woocommerce-section .button:hover,
.woocommerce-section #place_order:hover,
.woocommerce-section .checkout-button:hover{background:var(--green-light);box-shadow:0 8px 28px rgba(45,106,79,.45)}
.woocommerce-section .checkout-button,
.woocommerce-section .wc-proceed-to-checkout .button{background:var(--gold);color:var(--green-deep)}
.woocommerce-section .checkout-button:hover{background:var(--gold-dark);color:var(--white)}
.woocommerce-section .cart_totals h2,
.woocommerce-section #order_review_heading,
.woocommerce-section .woocommerce-billing-fields h3{margin-bottom:14px}
.woocommerce-section a{color:var(--green-mid)}
.woocommerce-section a:hover{color:var(--green-deep)}
.woocommerce-section .woocommerce-message,
.woocommerce-section .woocommerce-info,
.woocommerce-section .woocommerce-error{list-style:none;background:var(--cream-soft);border-top:3px solid var(--green-light);border-radius:var(--radius-sm);padding:16px 20px;margin-bottom:20px;color:var(--text-body)}
.woocommerce-section .woocommerce-error{border-top-color:var(--orange)}
/* Rimuove l'icona pseudo di WooCommerce che si accavalla al testo della
   notice (la notice del tema usa già il bordo superiore come accento). */
.woocommerce-section .woocommerce-message::before,
.woocommerce-section .woocommerce-info::before,
.woocommerce-section .woocommerce-error::before{display:none}
/* Bottone dentro le notice (es. "Sfoglia prodotti"): testo bianco leggibile,
   evita il verde-su-verde che lo rendeva invisibile sul fondo. */
.woocommerce-section .woocommerce-message a.button,
.woocommerce-section .woocommerce-info a.button,
.woocommerce-section .woocommerce-error a.button{background:var(--green-mid) !important;color:var(--white) !important}
.woocommerce-section .woocommerce-message a.button:hover,
.woocommerce-section .woocommerce-info a.button:hover,
.woocommerce-section .woocommerce-error a.button:hover{background:var(--green-light) !important;color:var(--white) !important}
/* Layout "Il mio account": navigazione a pillole sopra, contenuto sotto
   (neutralizza i float/larghezze a due colonne di default di WooCommerce). */
.woocommerce-account .woocommerce{display:block}
.woocommerce-section .woocommerce-MyAccount-navigation,
.woocommerce-section .woocommerce-MyAccount-content{float:none !important;width:auto !important;margin:0}
.woocommerce-section .woocommerce-MyAccount-navigation{margin-bottom:26px;padding-bottom:22px;border-bottom:1px solid rgba(0,0,0,.08)}
.woocommerce-section .woocommerce-MyAccount-navigation ul{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.woocommerce-section .woocommerce-MyAccount-navigation a{display:inline-block;padding:9px 20px;border-radius:50px;background:rgba(0,0,0,.05);color:var(--green-deep);font-weight:700;text-decoration:none;transition:background .2s,color .2s}
.woocommerce-section .woocommerce-MyAccount-navigation a:hover{background:rgba(0,0,0,.1)}
.woocommerce-section .woocommerce-MyAccount-navigation li.is-active a{background:var(--green-mid);color:var(--white)}
.woocommerce-section .woocommerce-MyAccount-navigation li.is-active a:hover{background:var(--green-deep)}
.woocommerce-section .woocommerce-MyAccount-content{color:var(--text-body);line-height:1.7}
.woocommerce-section .woocommerce-MyAccount-content > p{margin-bottom:14px}
.woocommerce-section .woocommerce-MyAccount-content a{color:var(--green-mid);font-weight:600}
.woocommerce-section .woocommerce-MyAccount-content a:hover{color:var(--green-deep)}

/* ═══ PAGINE STATICHE ═══ */
/* Le pagine normali devono scavalcare l'header fisso e avere testo leggibile
   sul box chiaro (la home usa front-page.php, non questo template). */
/* Extra spazio in alto: il logo sporge sotto l'header fisso, quindi il box
   parte più in basso per non accavallarsi. */
.page-section{padding-top:calc(68px + var(--section-pad) + 56px)}
.page-section .content-box{color:var(--text-body)}
.page-section .content-box .section-title{color:var(--green-deep);margin-bottom:20px}
.page-section .entry-content{line-height:1.8}
.page-section .entry-content > * + *{margin-top:16px}
.page-section .entry-content h2,
.page-section .entry-content h3{font-family:var(--font-display);color:var(--green-deep);margin-top:24px}
.page-section .entry-content a{color:var(--green-mid);text-decoration:underline}
.page-section .entry-content a:hover{color:var(--green-deep)}
.page-section .entry-content img{max-width:100%;height:auto;border-radius:var(--radius-md)}

/* ═══ BLOG / ARTICOLI ═══ */
/* Header blog: riusa lo stile .shop-hero centrato (senza immagine). */
.blog-hero .shop-hero-inner{flex-direction:column;text-align:center}
.blog-hero .shop-hero-desc{margin:0 auto}

/* Griglia articoli: mirror di .woocommerce-archive ul.products. */
.favole-post-grid{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:26px;padding:0;margin:0 0 40px}

/* Card articolo: estende .favole-card. */
.favole-card--post .favole-card-media,
.favole-card--cat .favole-card-media{aspect-ratio:1;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center}
.favole-card-placeholder{font-size:3rem;opacity:.6}
.favole-card-meta{font-family:var(--font-body);font-size:.78rem;font-weight:700;color:var(--orange);text-transform:uppercase;letter-spacing:1px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.favole-card-meta time{color:var(--text-muted);font-weight:600;letter-spacing:0;text-transform:none}
.favole-card-readmore{margin-top:auto;align-self:flex-start}
.favole-card-readmore.button{display:inline-block;text-align:center;background:var(--gold);color:var(--green-deep);font-family:var(--font-body);font-weight:800;border:none;border-radius:50px;padding:10px 22px;font-size:.88rem;text-decoration:none;transition:background .25s,color .25s}
.favole-card-readmore.button:hover{background:var(--gold-dark);color:var(--white)}

/* Paginazione articoli: mirror della paginazione shop. */
.blog-archive .navigation.pagination{margin-top:10px}
.blog-archive .navigation.pagination .nav-links{list-style:none;display:flex;gap:8px;justify-content:center;flex-wrap:wrap;padding:0}
.blog-archive .navigation.pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.12);color:var(--white);text-decoration:none;font-weight:700;padding:0 6px}
.blog-archive .navigation.pagination .page-numbers.current{background:var(--gold);color:var(--green-deep)}
.blog-archive .navigation.pagination a.page-numbers:hover{background:rgba(255,255,255,.25)}

/* Articolo singolo: hero ereditato da .favole-product-wrap. */
.favole-post-wrap .hero-meta{font-family:var(--font-body);font-size:.92rem;font-weight:600;color:rgba(255,255,255,.85);display:flex;gap:10px;align-items:center;margin-bottom:18px}
.favole-post-wrap .hero-subtitle{color:var(--gold)}
.blog-section .entry-content{color:var(--text-body);line-height:1.8;font-size:1.05rem}
.blog-section .entry-content > * + *{margin-top:18px}
.blog-section .entry-content h2,
.blog-section .entry-content h3{font-family:var(--font-display);color:var(--green-deep);margin-top:28px}
.blog-section .entry-content a{color:var(--green-mid);text-decoration:underline}
.blog-section .entry-content a:hover{color:var(--green-deep)}
.blog-section .entry-content img{max-width:100%;height:auto;border-radius:var(--radius-md)}
.blog-section .entry-content blockquote{border-left:6px solid var(--gold);padding:8px 20px;margin:0;color:var(--text-muted);font-style:italic}
.blog-section .entry-content ul,
.blog-section .entry-content ol{padding-left:1.4em}
.entry-tags{margin-top:28px;padding-top:18px;border-top:1px solid rgba(0,0,0,.08);font-size:.9rem;color:var(--text-muted)}
.entry-tags-label{font-weight:700;color:var(--green-deep)}
.entry-tags a{color:var(--green-mid);text-decoration:none}
.entry-tags a:hover{text-decoration:underline}
.page-links{margin-top:24px;display:flex;gap:8px;align-items:center}
.blog-related .section-title,
.blog-latest .section-title{color:var(--white);text-shadow:0 2px 18px rgba(0,0,0,.4)}
.blog-related .section-label,
.blog-latest .section-label{color:var(--gold)}
.blog-latest .section-title{margin-bottom:24px}
@media(max-width:900px){.favole-post-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.favole-post-grid{grid-template-columns:1fr}}

/* ═══ REDUCED MOTION ═══ */
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
