/* =========================================================
   Integrazione con WordPress e WooCommerce
   ========================================================= */
body.tcr{overflow-x:hidden}
.tcr .skip:focus{position:fixed;left:12px;top:12px;width:auto;height:auto;clip:auto;background:#fff;padding:10px 16px;z-index:100;border-radius:10px}
.logo-text{font-family:var(--f-display);font-size:1.6rem;color:var(--oliva-deep)}
.admin-bar .site-header{top:32px}
@media (max-width:782px){.admin-bar .site-header{top:46px}}
.admin-bar .h-sticky,.admin-bar .journey-sticky{top:calc(var(--hh) + 32px);height:calc(100vh - var(--hh) - 32px)}

/* nascondi il pulsante chat del plugin se usiamo il nostro */
.tcr-hide-chat #simple-chat-button--container,.tcr-hide-chat .simple-chat-button,.tcr-hide-chat [class*="simple-chat-button"]{display:none!important}

/* ricerca */
.search-bar{border-top:1px solid var(--line);background:var(--bianco);padding:14px 0}
.search-bar .wrap{display:flex;gap:10px;height:auto}
.search-bar input[type=search]{flex:1;min-width:0;padding:.85em 1.2em;border:2px solid var(--line);border-radius:999px;font:inherit}
.search-bar input[type=search]:focus{outline:none;border-color:var(--cobalto)}

/* negozio */
a.chip{text-decoration:none}
a.chip[aria-current="page"]{background:var(--oliva);color:#fff}
.switch{text-decoration:none;margin-top:4px}
.switch .sw{width:40px;height:24px;border-radius:12px;background:var(--line);position:relative;flex-shrink:0;transition:background .2s}
.switch .sw::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s}
.switch[aria-checked="true"] .sw{background:var(--arancia)}
.switch[aria-checked="true"] .sw::after{transform:translateX(16px)}
.toolbar .woocommerce-ordering{margin:0}
.toolbar select.orderby{padding:.65em 2.2em .65em 1em;border-radius:999px;border:2px solid var(--line);font:inherit;background:#fff}
.tag.out{background:var(--muted)}
.navigation.pagination{margin-top:40px}
.nav-links{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.nav-links .page-numbers{min-width:44px;height:44px;display:grid;place-items:center;border-radius:50%;border:2px solid var(--line);text-decoration:none;font-weight:700}
.nav-links .page-numbers.current{background:var(--oliva);border-color:var(--oliva);color:#fff}
@media (max-width:960px){.switch{margin-bottom:6px}}

/* scheda prodotto */
.pdp-gallery{position:sticky;top:110px}
.pdp-gallery .pdp-media{position:static}
.pdp-thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.pdp-thumbs button{width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:3px solid transparent;background:none}
.pdp-thumbs button[aria-current="true"]{border-color:var(--oliva)}
.pdp-thumbs img{width:100%;height:100%;object-fit:cover}
.pdp-price{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.pdp-lead p{margin:0 0 .6em}
.variants button{display:flex;flex-direction:column;align-items:flex-start;line-height:1.25;text-align:left}
.variants button small{font-weight:600;color:var(--muted);font-size:.85rem}
.variants button[aria-checked="true"]{border-color:var(--oliva);background:#EEF3E8}
.variants button:disabled{opacity:.45;cursor:not-allowed}
.out-note{background:#FBE4DC;border-radius:14px;padding:14px 18px;font-weight:600}
.specs{display:grid;grid-template-columns:max-content 1fr;gap:8px 18px;margin:0}
.specs dt{font-weight:700;color:var(--ink)}
.specs dd{margin:0}
details .body p:last-child{margin-bottom:0}
.pdp-recipe img{width:160px;height:110px;object-fit:cover;border-radius:14px}
@media (max-width:860px){.pdp-gallery{position:static}}

/* contenuti testuali (pagine, ricette, resi) */
.entry{max-width:820px}
.entry h2{font-size:2rem;color:var(--oliva-deep);margin-top:1.4em}
.entry h3{color:var(--oliva-deep);margin-top:1.2em}
.entry p,.entry li{color:#3c4536}
.entry img{border-radius:16px;height:auto}
.entry a{color:var(--cobalto);font-weight:600}
.entry ul,.entry ol{padding-left:1.3em}
.entry-elementor{max-width:none}
.form-err{background:#FBE4DC;color:#8E2A14;border-radius:14px;padding:12px 16px;font-weight:600}

/* ricetta */
.r-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.r-side{position:sticky;top:110px;display:grid;gap:16px;align-content:start}
.r-side .r-products{margin-top:0}
.recipe-content{max-width:none}
.recipe-content .ingr-list{list-style:none;padding:0;margin:0 0 1em;background:var(--sole-pale);border-radius:20px;padding:18px 20px}
.recipe-content .ingr-list label{display:flex;gap:12px;align-items:flex-start;padding:6px 0;cursor:pointer}
.recipe-content .ingr-list input{appearance:none;flex-shrink:0;width:22px;height:22px;border-radius:7px;border:2px solid var(--oliva);background:#fff;margin:2px 0 0;display:grid;place-items:center;cursor:pointer}
.recipe-content .ingr-list input:checked{background:var(--oliva)}
.recipe-content .ingr-list input:checked::after{content:"";width:6px;height:11px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translate(-1px,-1px)}
.recipe-content .ingr-list input:checked+span{text-decoration:line-through;color:var(--muted)}
.recipe-content .step-p{position:relative;padding:16px 18px 16px 66px;border:2px solid var(--line);border-radius:18px;background:#fff;cursor:pointer;transition:background .2s,border-color .2s,opacity .2s}
.recipe-content .step-p::before{content:attr(data-n);position:absolute;left:14px;top:14px;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-family:var(--f-display);font-size:1.2rem;color:var(--cobalto);box-shadow:inset 0 0 0 3px var(--cobalto),inset 0 0 0 5px #fff,inset 0 0 0 7px var(--sole)}
.recipe-content .step-p.current{border-color:var(--sole);background:var(--sole-pale)}
.recipe-content .step-p.done{opacity:.55}
@media (max-width:900px){.r-side{position:static;order:2}}

/* WooCommerce: avvisi, moduli, carrello e checkout */
.tcr .woocommerce-message,.tcr .woocommerce-info,.tcr .woocommerce-error,.tcr .wc-block-components-notice-banner{border-radius:16px;border:0;background:var(--sole-pale);color:var(--ink);padding:14px 18px;list-style:none;margin:0 0 20px}
.tcr .woocommerce-error{background:#FBE4DC}
.tcr .woocommerce-message::before,.tcr .woocommerce-info::before{display:none}
.woo-wrap input.input-text,.woo-wrap select,.woo-wrap textarea,.woo-wrap .select2-selection,.woo-wrap .wc-block-components-text-input input{border:2px solid var(--line)!important;border-radius:14px!important;padding:.75em 1em!important;font:inherit!important;background:#fff!important;min-height:48px}
.woo-wrap .select2-selection{height:auto!important}
.woo-wrap label{font-weight:700;font-size:.92rem}
.woo-wrap .button,.woo-wrap button.button,.woo-wrap .checkout-button,.woo-wrap #place_order,.woo-wrap .wc-block-components-button:not(.is-link){background:var(--cobalto)!important;color:#fff!important;border:0!important;border-radius:999px!important;padding:1em 1.8em!important;font-weight:700!important;font-family:var(--f-body)!important;box-shadow:0 4px 0 var(--cobalto-deep)}
.woo-wrap .button:hover,.woo-wrap #place_order:hover{background:#2759aa!important}
.woo-wrap h2,.woo-wrap h3{font-family:var(--f-display);font-weight:400;color:var(--oliva-deep)}
.woo-wrap table.shop_table{border:1px solid var(--line);border-radius:20px;border-collapse:separate;overflow:hidden;background:#fff;width:100%}
.woo-wrap table.shop_table th,.woo-wrap table.shop_table td{padding:14px 16px;border-top:1px solid var(--line)}
.woo-wrap #customer_details,.woo-wrap #order_review,.woo-wrap .woocommerce-MyAccount-content,.woo-wrap .woocommerce-form-login,.woo-wrap .woocommerce-form-register{background:#fff;border:1px solid var(--line);border-radius:24px;padding:clamp(20px,3vw,32px)}
.woo-wrap #order_review_heading{margin-top:28px}
.woo-wrap .woocommerce-checkout-payment{background:var(--sole-pale)!important;border-radius:18px!important}
.woo-wrap .woocommerce-MyAccount-navigation ul{list-style:none;padding:0;display:grid;gap:6px}
.woo-wrap .woocommerce-MyAccount-navigation a{display:block;padding:10px 16px;border-radius:999px;text-decoration:none;font-weight:700}
.woo-wrap .woocommerce-MyAccount-navigation .is-active a{background:var(--oliva);color:#fff}
.woo-wrap .wc-block-cart__submit-button,.woo-wrap .wc-block-components-checkout-place-order-button{width:100%}
.woo-wrap .wc-block-components-sidebar,.woo-wrap .wp-block-woocommerce-cart-order-summary-block{background:#fff;border:1px solid var(--line);border-radius:24px;padding:20px}
.woo-wrap .wc-block-cart-items{background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden}
.woo-wrap .wc-block-cart-items td,.woo-wrap .wc-block-cart-items th{padding:16px!important}
.woo-wrap .wc-block-components-product-name{font-weight:700;color:var(--ink);text-decoration:none}
.woo-wrap .wc-block-cart-item__image img{border-radius:12px}
.woo-wrap .wc-block-components-totals-footer-item .wc-block-components-totals-item__value{font-family:var(--f-display);font-size:1.6rem;font-weight:400}
.woo-wrap .woocommerce-order-overview{list-style:none;padding:20px;display:flex;gap:24px;flex-wrap:wrap;background:var(--sole-pale);border-radius:20px}
