/*
Theme Name: AffiliatePrime V2
Author: Tuo Nome
Description: V. 52.9.4 - HIGH-CONVERTING 404 & ZERO-SEARCH REDESIGN + UNIVERSAL SEARCH FORM
Version: 52.9.4
*/

/* =========================================
   0. SELF-HOSTED INTER FONT & CLS FALLBACK
   ========================================= */
@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/font-regular.ttf?v=3.2') format('truetype'),
         url('assets/fonts/font1.ttf?v=3.2') format('truetype');
    font-weight: 100 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/font-bold.ttf?v=3.2') format('truetype'),
         url('assets/fonts/font1-bold.ttf?v=3.2') format('truetype');
    font-weight: 600 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/font-italic.ttf?v=3.2') format('truetype'),
         url('assets/fonts/font1-italic.ttf?v=3.2') format('truetype');
    font-weight: 100 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/font-bold-italic.ttf?v=3.2') format('truetype'),
         url('assets/fonts/font1-bold-italic.ttf?v=3.2') format('truetype');
    font-weight: 600 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Inter-fallback';
    src: local('Arial'), local('Helvetica'), local('-apple-system');
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
    size-adjust: 107%;
}

/* =========================================
   1. RESET & BASE (Mobile First)
   ========================================= */
:root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --accent: #ff6900;
    --bg-body: #ffffff;
    --bg-footer: #f8f9fa;
    --border-color: #dadce0;
    --font-main: 'Inter', 'Inter-fallback', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --container-width: 1240px;
    --shadow-base: 0 2px 5px rgba(0,0,0,0.15);      
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.12); 
    --shadow-current: var(--shadow-base); 
    
    /* Design System Tokens */
    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --space-2: 8px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
}

body.has-soft-shadows { 
    --shadow-current: var(--shadow-soft); 
}

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
}

body { 
    font-family: var(--font-main);
    font-size: 16px; 
    line-height: 1.6; 
    color: var(--text-primary); 
    background: var(--bg-body); 
    -webkit-font-smoothing: antialiased; 
    overflow-x: clip; 
}

/* FIX IMMAGINI GLOBALE */
img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: 0.2s; 
}

ul { 
    list-style: none; 
}

.container { 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 15px; 
}

.container-fluid { 
    width: 100%; 
    padding: 0 15px; 
}

.btn { 
    font-weight: 500; 
    cursor: pointer; 
    display: inline-block; 
}

.screen-reader-text { 
    clip: rect(1px, 1px, 1px, 1px); 
    height: 1px; 
    overflow: hidden; 
    position: absolute; 
    width: 1px; 
    word-wrap: normal; 
}

.list-reset { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

/* =========================================
   2. HEADER & MENU (UNIFICATO & GLASSMORPHISM)
   ========================================= */
.site-header-clean { 
    background: #fff; 
    padding: 12px 0; 
    border-bottom: 1px solid var(--border-color); 
}

.header-flex-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.logo h1 { 
    font-size: 1.4rem; 
    margin: 0; 
    font-weight: 900; 
    letter-spacing: -1px; 
    line-height: 1; 
}

.header-socials { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.btn-live-pulse { 
    display: inline-flex; 
    align-items: center; 
    background: #d32f2f; 
    color: #fff; 
    padding: 6px 10px; 
    border-radius: 20px; 
    font-size: 0.7rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    animation: shadowPulse 2s infinite; 
    white-space: nowrap; 
}

.pulse-dot { 
    width: 6px; 
    height: 6px; 
    background: #fff; 
    border-radius: 50%; 
    margin-right: 6px; 
    animation: blinkAnimation 1s infinite alternate; 
    flex-shrink: 0; 
}

@media screen and (max-width: 400px) {
    .live-text { display: none; }
    .pulse-dot { margin-right: 0; width: 8px; height: 8px; }
    .btn-live-pulse { padding: 6px; border-radius: 50%; width: 28px; height: 28px; justify-content: center; }
}

@keyframes blinkAnimation { 
    0% { opacity: 1; } 
    100% { opacity: 0.4; } 
}

@keyframes shadowPulse { 
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.5); } 
    100% { box-shadow: 0 0 0 8px rgba(211, 47, 47, 0); } 
}

.social-sticker { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    box-shadow: var(--shadow-current); 
    transition: transform 0.2s; 
    color: #fff; 
    text-decoration: none; 
    font-weight: bold; 
    flex-shrink: 0; 
}

.social-sticker:hover { transform: translateY(-3px); }

.sticker-fb { background: #1877f2; }
.sticker-tg { background: #0088cc; }
.sticker-wa { background: #25D366; } 
.sticker-x  { background: #000000; } 
.sticker-pin { background: #E60023; }
.sticker-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.sticker-search { 
    background: #f1f3f4; 
    border: 1px solid #e0e0e0; 
    cursor: pointer; 
    padding: 0; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #555; 
}
.sticker-search svg { stroke: currentColor; }

/* Menu Sticky Base */
.menu-sticky-wrapper { 
    position: relative; 
    border-bottom: 1px solid var(--border-color); 
    width: 100%; 
    background: #fff; 
    z-index: 9999; 
    height: auto !important; 
    min-height: max-content; 
}

body.has-sticky-header .menu-sticky-wrapper { 
    position: -webkit-sticky; 
    position: sticky; 
    top: -1px; 
    background: #fff; 
    transition: top 0.1s ease; 
}

/* Glassmorphism */
body.has-glassmorphism .site-header-clean,
body.has-glassmorphism .menu-sticky-wrapper { 
    background: rgba(255, 255, 255, 0.75) !important; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
}
body.has-glassmorphism .menu-sticky-wrapper { 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
}

.nav-container { 
    display: flex; 
    align-items: center; 
    width: 100%; 
}

/* Menu Mobile Nav */
.desktop-nav { display: none; width: 100%; } 
.mobile-nav { display: block; width: 100%; overflow: hidden; }

.mobile-scroll-wrapper { 
    overflow-x: auto; 
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; 
    white-space: nowrap; 
}
.mobile-scroll-wrapper::-webkit-scrollbar { display: none; }

.mobile-menu-list { display: flex; margin: 0; padding: 0; }
.mobile-menu-list li { flex-shrink: 0; }
.mobile-menu-list li a { 
    display: inline-block; 
    padding: 16px 14px; 
    font-weight: 700; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    color: var(--text-secondary); 
    background: transparent !important; 
    border-radius: 0; 
    border-bottom: 3px solid transparent; 
    transition: all 0.2s; 
}
.mobile-menu-list li.current-menu-item a, 
.mobile-menu-list li a:active { 
    color: var(--text-primary) !important; 
    border-bottom-color: var(--accent) !important; 
}

/* Sub-Bar (Categorie) */
.mobile-sub-bar { 
    background: #f8f9fa; 
    border-bottom: 1px solid var(--border-color); 
    overflow-x: auto; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
    padding: 8px 0; 
}
.mobile-sub-bar ul { display: flex; gap: 15px; padding: 0 15px; margin: 0; }
.mobile-sub-bar li { flex-shrink: 0; }
.mobile-sub-bar li a { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }

/* Menu Desktop Nav */
.blocksy-menu { display: flex; justify-content: center; flex-wrap: wrap; }
.blocksy-menu > li { margin: 0 2px; position: relative !important; }
.blocksy-menu > li > a { 
    display: block; 
    padding: 16px 10px; 
    font-weight: 700; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    color: var(--text-secondary); 
    border-bottom: 3px solid transparent; 
    transition: all 0.2s; 
}
.blocksy-menu > li > a:hover, 
.blocksy-menu > li.current-menu-item > a { 
    color: var(--text-primary); 
    border-bottom-color: var(--accent); 
}

.blocksy-menu ul { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: #fff; 
    min-width: 220px; 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-current); 
    padding: 5px 0; 
    z-index: 1000; 
    border-radius: 4px; 
}
.blocksy-menu li:hover > ul { display: block !important; }
.blocksy-menu ul li a { 
    padding: 10px 20px; 
    font-weight: 400; 
    border-bottom: 1px solid #f1f3f4; 
    text-transform: none; 
    color: var(--text-primary); 
    font-size: 0.9rem; 
}

/* =========================================
   3. LAYOUT & CARDS
   ========================================= */
.main-content-area { 
    position: relative;
    z-index: 1;
    padding-top: 40px; 
    padding-bottom: 60px; 
    clear: both;
}

/* Griglie Mobile Base */
.page-layout-grid, .wc-layout-grid, .simple-grid, .wc-category-section ul, .related-section ul { 
    display: grid; 
    grid-template-columns: 100%; 
    gap: 30px; 
    width: 100%; 
}

.wc-category-section { margin-bottom: 50px; padding-bottom: 30px; border-bottom: 1px solid var(--border-color); }
.wc-cat-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; border-bottom: 2px solid var(--text-primary); padding-bottom: 8px; }
.wc-cat-title { font-size: 1.4rem; margin: 0; }
.wc-cat-link { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); }

/* Card Principale (Main Story) */
.wc-main-story { display: block; width: 100%; min-width: 0; }
.wc-main-img { 
    width: 100%;      
    max-width: 100%;  
    border-radius: 8px; 
    overflow: hidden; 
    margin-bottom: 15px; 
    border: 1px solid var(--border-color); 
    aspect-ratio: 16/9; 
    box-shadow: var(--shadow-current); 
}
.wc-main-img img { width: 100% !important; height: 100% !important; object-fit: cover; transition: transform 0.3s; }
.wc-main-story:hover .wc-main-img img { transform: scale(1.02); }
.wc-main-title { font-size: 1.35rem; margin-bottom: 10px; line-height: 1.3; overflow-wrap: break-word; }
.wc-main-excerpt { font-size: 1rem; color: var(--text-secondary); line-height: 1.6; }

/* Card Laterale / Piccola */
.wc-side-list { display: flex; flex-direction: column; gap: 20px; }
.wc-small-card { display: flex; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid #f1f3f4; align-items: flex-start; }
.wc-small-card:last-child { border-bottom: none; }
.wc-small-img { 
    flex: 0 0 85px; 
    width: 85px; 
    height: 70px; 
    border-radius: 6px; 
    overflow: hidden; 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-current); 
}
.wc-small-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 85 / 70; }
.wc-small-content { flex: 1; min-width: 0; }
.wc-small-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin: 0; word-wrap: break-word; overflow-wrap: break-word; }

/* Grid Semplice */
.simple-media { 
    border-radius: 8px; 
    overflow: hidden; 
    margin-bottom: 12px; 
    border: 1px solid var(--border-color); 
    aspect-ratio: 16/9; 
    box-shadow: var(--shadow-current); 
}
.simple-media img { width: 100%; height: 100%; object-fit: cover; }

/* Hero Slider Nativo CSS */
.hero-slider-container { 
    position: relative; 
    margin-bottom: 40px; 
    background: #fff; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-current); 
}

.af-slider-track { 
    display: flex !important; 
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; 
    scroll-snap-type: x mandatory !important; 
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth; 
    width: 100%; 
    align-items: stretch; 
}
.af-slider-track::-webkit-scrollbar { display: none; }

.af-slide-item { 
    flex: 0 0 100% !important; 
    width: 100% !important; 
    min-width: 100% !important; 
    scroll-snap-align: start !important; 
    position: relative; 
    opacity: 1 !important; 
    visibility: visible !important; 
    display: block !important; 
    margin: 0 !important; 
}

.wirecutter-layout { display: flex; flex-direction: column; height: 100%; background: #fff; }
.hero-image-wrap { height: 200px; position: relative; } 
.hero-image-wrap img.slide-img { width: 100%; height: 100%; object-fit: cover; }
.hero-content-wrap { padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.hero-title { font-size: 1.5rem; line-height: 1.2; margin-bottom: 10px; }
.hero-btn-read { display: inline-block; padding: 8px 20px; background: var(--text-primary); color: #fff; border-radius: 4px; margin-top: 15px; font-size: 0.9rem; text-align: center; }

/* Controlli Slider */
.slider-arrow { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: rgba(255,255,255,0.9); 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 20; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    border: none; 
    font-size: 1.2rem; 
    color: var(--text-primary); 
}
.prev-slide { left: 10px; } 
.next-slide { right: 10px; }

.slider-dots { 
    position: absolute; 
    bottom: 15px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 8px; 
    z-index: 20; 
}
.dot { 
    width: 10px; 
    height: 10px; 
    background: #dadce0; 
    border-radius: 50%; 
    cursor: pointer; 
    border: none; 
    padding: 0; 
}
.dot.active { background: var(--accent); transform: scale(1.2); transition: transform 0.2s; }

@media screen and (max-width: 767px) { 
    .slider-arrow { display: none; } 
}


/* =========================================
   4. SINGLE POST & SOCIAL
   ========================================= */
.single-container-narrow { max-width: 800px; margin: 0 auto; padding: 0 15px; }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    padding: 12px 0;
    border-top: 1px solid #f1f3f4;
    border-bottom: 1px solid #f1f3f4;
}

.entry-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.entry-meta i,
.entry-meta svg {
    color: var(--accent);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.standard-hero-image {
    margin-bottom: var(--space-8);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.standard-hero-image img {
    transition: transform 0.5s ease;
}

.standard-hero-image:hover img {
    transform: scale(1.03);
}
.entry-title-big { font-size: 1.8rem; line-height: 1.2; margin-bottom: 15px; word-wrap: break-word; overflow-wrap: break-word; }
.entry-content { font-size: 1.1rem; line-height: 1.6; color: #111111; font-weight: 400; }
.product-hero-layout { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; border-bottom: 1px solid var(--border-color); padding-bottom: 30px; }
.product-hero-image { border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow-current); }
.ph-badge { display: inline-block; background: #f1f3f4; color: var(--accent); padding: 4px 10px; border-radius: 4px; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; margin-bottom: 15px; }
.ph-title { font-size: 1.8rem; line-height: 1.2; margin-bottom: 10px; }
.related-section { margin-top: 80px; padding-top: 40px; border-top: 2px solid var(--text-primary); content-visibility: auto; contain-intrinsic-size: 500px; }

/* Social Share */
.entry-social-share { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 25px 0; flex-wrap: wrap; }
.share-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); margin-right: 5px; }
.entry-social-share .social-sticker { 
    display: flex !important; 
    align-items: center; 
    justify-content: center; 
    width: 40px !important; 
    height: 40px !important; 
    border-radius: 50% !important; 
    text-decoration: none !important; 
    transition: all 0.2s ease; 
    border: none !important; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
}
.entry-social-share .social-sticker:hover { transform: translateY(-3px); box-shadow: 0 5px 10px rgba(0,0,0,0.25); }
.entry-social-share .social-sticker svg { width: 20px !important; height: 20px !important; fill: #ffffff !important; display: block; margin: 0 auto; }

/* =========================================
   5. EXTRAS
   ========================================= */
.premium-pagination-wrapper { margin: 40px 0; width: 100%; display: flex; justify-content: center; }
.pagination-list { display: flex !important; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none !important; }
.pagination-item .page-numbers { 
    display: flex; align-items: center; justify-content: center; 
    width: 45px; height: 45px; background: #fff; 
    border: 1px solid #dadce0; color: #5f6368; 
    font-weight: 700; border-radius: 6px; transition: all 0.2s ease; 
    font-size: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
.pagination-item .page-numbers:hover:not(.current):not(.dots) { 
    border-color: var(--accent); color: var(--accent); 
    transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}
.pagination-item .page-numbers.current { 
    background: var(--accent); color: #fff; border-color: var(--accent); 
    box-shadow: 0 4px 10px rgba(255, 105, 0, 0.3); cursor: default; 
}
.pagination-item .page-numbers.dots { 
    border: none; background: transparent; width: auto; padding: 0 5px; box-shadow: none; 
}

/* Footer & Widget */
.site-footer-light { background-color: var(--bg-footer); color: var(--text-secondary); padding: 40px 0 30px 0; margin-top: 60px; border-top: 1px solid var(--border-color); content-visibility: auto; contain-intrinsic-size: 400px; }
.footer-container-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 40px; }
.footer-widget-title { font-size: 0.85rem; text-transform: uppercase; color: var(--text-primary); margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid #dadce0; padding-top: 20px; display: flex; flex-direction: column; gap: 15px; align-items: center; text-align: center; font-size: 0.8rem; }
.widget-box { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; margin-bottom: 30px; box-shadow: var(--shadow-current); }
.widget-title { font-size: 0.9rem; text-transform: uppercase; border-bottom: 1px solid #dadce0; padding-bottom: 10px; margin-bottom: 15px; color: var(--text-secondary); }
.widget-box ul li { padding: 8px 0; border-bottom: 1px solid #f1f3f4; font-size: 0.95rem; }

/* Overlay Ricerca */
.search-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(10, 10, 10, 0.98) !important; backdrop-filter: blur(15px); z-index: 9999999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.search-overlay.active { opacity: 1; visibility: visible; }
.search-modal-content { width: 100%; max-width: 700px; text-align: center; position: relative; z-index: 10000000; }
.search-field-big { width: 100%; border: none; border-bottom: 2px solid #555; background: transparent !important; font-size: 2.5rem; font-weight: 700; outline: none; text-align: center; color: #ffffff !important; padding: 10px 0 20px 0; margin-bottom: 40px; border-radius: 0; -webkit-appearance: none; }
.search-field-big:focus { border-bottom-color: var(--accent); }
.search-field-big::placeholder { color: #888; opacity: 1; }
.search-submit-big { background: var(--accent); color: #fff; border: none; padding: 14px 40px; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; border-radius: 50px; cursor: pointer; transition: transform 0.2s, background 0.2s; display: inline-block; }
.search-submit-big:hover { transform: scale(1.05); background: #fff; color: #000; }
.search-close-btn { position: absolute; top: 20px; right: 20px; background: transparent; border: none; color: #ffffff !important; font-size: 3rem; line-height: 1; padding: 10px; cursor: pointer; z-index: 10000001; transition: color 0.2s, transform 0.2s; }
.search-close-btn:hover { color: var(--accent) !important; transform: rotate(90deg); }

/* Elementi di Navigazione */
.cookie-banner { position: fixed; bottom: -120px; left: 10px; right: 10px; background: #202124; color: #fff; padding: 15px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 10px; z-index: 99998; transition: bottom 0.5s ease; font-size: 0.9rem; }
.cookie-banner.visible { bottom: 20px; }
.author-box { background: #fff; padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); margin-top: 50px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.author-avatar img { border-radius: 50%; width: 90px; height: 90px; border: 3px solid #f1f3f4; }
.author-info h4 { margin: 0 0 10px 0; font-size: 1.4rem; color: var(--text-primary); }
.author-info p { margin-bottom: 15px; font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary); }
.author-social-links { display: flex; gap: 10px; justify-content: center; flex-wrap: nowrap; }
.author-social-link { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #f1f3f4; color: #555; text-decoration: none; transition: all 0.3s ease; }
.author-social-link svg { display: block; width: 15px; height: 15px; transition: transform 0.2s ease; }
.author-social-link:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.12); }
.author-social-link:hover svg { transform: scale(1.1); }
.author-social-link.instagram:hover { background: #E1306C; color: #fff; }
.author-social-link.facebook:hover  { background: #1877F2; color: #fff; }
.author-social-link.telegram:hover  { background: #229ED9; color: #fff; }
.author-social-link.twitter:hover,
.author-social-link.x:hover         { background: #000000; color: #fff; }
.author-social-link.youtube:hover  { background: #FF0000; color: #fff; }
.author-social-link.website:hover  { background: var(--accent); color: #fff; }

/* Tag Pills Design */
.post-tags { margin-top: 40px; padding-top: 25px; border-top: 1px solid #eee; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-tags span { margin-right: 5px; }
.post-tags a { background: #f1f3f4; color: #555; padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease; border: 1px solid transparent; }
.post-tags a:hover { background: #fff; border-color: var(--accent); color: var(--accent); text-decoration: none; transform: scale(1.05); }

.progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 5px; z-index: 999999; background: transparent; pointer-events: none; }
#reading-progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s linear; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.back-to-top { position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.2); cursor: pointer; z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease; border: none; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* Animazioni Base */
.reveal-fx { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; will-change: opacity, transform; }
.reveal-fx.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal-fx { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* =========================================
   6. MEDIA QUERIES (TABLET E DESKTOP BASE)
   ========================================= */

/* --- TABLET (768px - 991px) --- */
@media (min-width: 768px) {
    .simple-grid, .wc-category-section ul, .related-section ul { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .footer-container-grid { grid-template-columns: 1fr 1fr; }
    .hero-image-wrap { height: 350px; }
    .hero-content-wrap { padding: 30px; }
    .cookie-banner { flex-direction: row; align-items: center; left: 20px; right: auto; max-width: 450px; }
    .author-box { flex-direction: row; text-align: left; gap: 30px; }
    .author-avatar img { width: 110px; height: 110px; }
    .author-social-links { justify-content: flex-start; }
    
    /* Tipografia Intermedia Fluida */
    .ph-title { font-size: clamp(1.8rem, 4vw, 2.4rem); }
    .entry-title-big { font-size: clamp(1.8rem, 4vw, 2.2rem); }
    
    .wc-small-img { flex: 0 0 120px; height: 90px; width: 120px; }
    
    /* Widget in 2 colonne sotto il contenuto su Tablet */
    #secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
    #secondary .widget-box { height: 100%; margin-bottom: 0; }
}

/* Affiliate Disclaimer Styling */
.affiliate-disclaimer { 
    background-color: #fff9f5; 
    border: 1px solid #ffe4d3;
    border-left: 4px solid var(--accent, #ff6900); 
    padding: 18px 24px; 
    margin-bottom: 40px; 
    font-size: 0.9rem; 
    line-height: 1.6; 
    color: #5c4033; 
    border-radius: 4px 12px 12px 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.05);
}
.affiliate-disclaimer i,
.affiliate-disclaimer svg { 
    color: var(--accent, #ff6900); 
    font-size: 1.4rem; 
    flex-shrink: 0;
}

/* --- DESKTOP (Soglia Laptop: 992px) --- */
@media (min-width: 992px) {
    .desktop-nav { display: block; } 
    .mobile-nav { display: none; }
    .logo h1 { font-size: 1.75rem; }
    
    /* Griglie a 2 colonne per far respirare gli articoli */
    .simple-grid, .wc-category-section ul, .related-section ul { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    
    /* LAYOUT PRINCIPALE: Contenuto + Sidebar a destra. */
    .page-layout-grid { 
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px !important; 
        gap: 50px; 
        align-items: start; 
    }
    
    /* Sidebar Sticky Desktop a destra */
    #secondary { 
        display: block; 
        position: -webkit-sticky;
        position: sticky; 
        top: 100px; 
        align-self: start; 
        width: 100%;
    }
    
    /* Annulla la griglia dei widget del tablet e li rimette in colonna verticale */
    #secondary .widget-box { 
        height: auto !important; 
        margin-bottom: 30px !important; 
    }

    /* Layout Desktop avanzati */
    .wc-layout-grid { grid-template-columns: 1.5fr 1fr; gap: 40px; }
    .wc-small-img { flex: 0 0 140px; width: 140px; height: 95px; }
    .wc-small-title { font-size: 1.15rem; }

    .wirecutter-layout { flex-direction: row; align-items: center; }
    .hero-image-wrap { height: 100%; flex: 0 0 55%; min-height: 400px; }
    .hero-content-wrap { flex: 1; padding: 50px; }
    .hero-title { font-size: clamp(2rem, 3vw, 2.6rem); }
    
    .product-hero-layout { flex-direction: row; gap: 60px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
    .ph-title { font-size: 2.8rem; }
    .entry-title-big { font-size: 2.8rem; }
    
    .footer-container-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 50px; }
    .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
    .search-field-big { font-size: 3rem; text-align: left; }
}

/* Interazioni Mouse (Desktop ed Elementi non touch) */
@media (hover: hover) and (pointer: fine) {
    .wc-main-story:hover .wc-main-title a, 
    .wc-small-card:hover .wc-small-title a, 
    .simple-media:hover + h4 a { 
        color: var(--accent); 
        transition: color 0.2s ease; 
    }
    
    .hero-slide:hover .slide-img { 
        transform: scale(1.03); 
        transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    }
    
    .hero-btn-read:hover { 
        background-color: var(--accent); 
        color: #fff; 
        transform: translateY(-2px); 
        box-shadow: 0 6px 15px rgba(255, 105, 0, 0.3); 
    }
}

/* ADMIN BAR FIX - LA SOLUZIONE AL PROBLEMA DELLO SPAZIO VUOTO SU MOBILE */
body.admin-bar .menu-sticky-wrapper { top: 32px !important; }
body.admin-bar .progress-container { top: 32px !important; }
@media screen and (max-width: 782px) {
    body.admin-bar .menu-sticky-wrapper { top: -1px !important; }
    body.admin-bar .progress-container { top: 0 !important; }
}

/* =========================================
   7. FIX DEFINITIVO RESPONSIVE & WORDPRESS CORE
   ========================================= */

/* =========================================================================
   FIX TIPOGRAFIA DEGLI ARTICOLI (Grassetto, Corsivo, Liste)
   ========================================================================= */
html, body {
    font-synthesis: weight style;
}

b, strong {
    font-weight: 700 !important;
}

i, em, cite, dfn {
    font-style: italic !important;
}

strong em, em strong, b i, i b, strong i, i strong, b em, em b {
    font-weight: 700 !important;
    font-style: italic !important;
}

.entry-content p { 
    margin-bottom: 1.5em; 
}

.entry-content h2, .entry-content h3, .entry-content h4 { 
    margin-top: 1.5em; 
    margin-bottom: 0.6em; 
    font-weight: 800;
}

.entry-content strong,
.entry-content b {
    font-weight: 700 !important;
    color: var(--text-primary, #1e293b);
}

.entry-content em,
.entry-content i {
    font-style: italic !important;
}

.entry-content mark {
    background-color: #fef08a;
    color: #854d0e;
    padding: 2px 6px;
    border-radius: 4px;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent, #ff6900);
    padding: 14px 20px;
    margin: 24px 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary, #475569);
}

.entry-content blockquote p {
    margin-bottom: 0;
}
/* =========================================================================
   RIPRISTINO LISTE PUNTATE E NUMERATE (.entry-content, .wp-block-list)
   ========================================================================= */
.entry-content ul:not([class*="af-"]):not([class*="sap-"]):not(.list-reset),
.entry-content .wp-block-list {
    list-style-type: disc !important;
    list-style-position: outside !important;
    padding-left: 28px !important;
    margin-bottom: 1.5em !important;
}

.entry-content ol:not([class*="af-"]):not([class*="sap-"]):not(.list-reset) {
    list-style-type: decimal !important;
    list-style-position: outside !important;
    padding-left: 28px !important;
    margin-bottom: 1.5em !important;
}

.entry-content ul:not([class*="af-"]):not([class*="sap-"]):not(.list-reset) li,
.entry-content ol:not([class*="af-"]):not([class*="sap-"]):not(.list-reset) li,
.entry-content .wp-block-list li {
    display: list-item !important;
    margin-bottom: 0.5em !important;
    line-height: 1.6 !important;
}

.entry-content ul ul {
    list-style-type: circle !important;
    margin-top: 0.4em !important;
    margin-bottom: 0.4em !important;
    padding-left: 22px !important;
}

.entry-content ol ol {
    list-style-type: lower-alpha !important;
    margin-top: 0.4em !important;
    margin-bottom: 0.4em !important;
    padding-left: 22px !important;
}

/* ─── Link Editoriali Premium ───────────────────────────────────────────── */
/* Variabili di default: sovrascrivibili dal Customizer via wp_head          */
/* --af-link-color, --af-link-hover-color, --af-link-visited-color           */
/* --af-link-thickness definiti in enqueue.php (affiliateprime_link_css)     */

/* Esclusi: pulsanti, box prodotti AF, link nav, link ToC, widget */
.entry-content a:not(.btn):not(.wp-block-button__link):not([class*="af-"]):not([class*="sap-"]) {
    color: var(--af-link-color, #0066cc);
    text-decoration: underline;
    text-decoration-color: var(--af-link-color, #0066cc);
    text-decoration-thickness: var(--af-link-thickness, 2px);
    text-underline-offset: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, text-decoration-color 0.2s ease;
    border-radius: 2px;
    padding: 0 1px;
}

.entry-content a:not(.btn):not(.wp-block-button__link):not([class*="af-"]):not([class*="sap-"]):hover {
    color: var(--af-link-hover-color, #004499);
    text-decoration: none;
    background-color: rgba(0, 102, 204, 0.08); /* Effetto evidenziatore */
    padding: 1px 3px;
    margin: 0 -2px;
}

/* Link già visitati (mantiene coerenza con il colore del link senza viola) */
.entry-content a:not(.btn):not(.wp-block-button__link):not([class*="af-"]):not([class*="sap-"]):visited {
    color: var(--af-link-color, #0066cc);
    text-decoration-color: var(--af-link-color, #0066cc);
}


.entry-content blockquote { 
    border-left: 4px solid var(--accent); 
    padding-left: 20px; 
    font-style: italic; 
    margin: 20px 0; 
    color: #555; 
}

/* A. Fix Immagini e Attributi Inline di Gutenberg */
.entry-content img {
    max-width: 100% !important;
    height: auto !important; 
    object-fit: contain;
}

/* B. Fix Iframe, Embed e Video YouTube per evitare sbrodolamenti */
.entry-content iframe, 
.entry-content embed, 
.entry-content object, 
.entry-content video {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
}

/* C. Prevenzione Overflow per Tabelle e Testo Preformattato */
.entry-content table {
    width: 100% !important;
    max-width: 100%;
    display: block; 
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    word-wrap: break-word;
}

.entry-content pre, 
.entry-content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap; 
    word-wrap: break-word;
}

/* D. Azzera Allineamenti WordPress su Mobile (Approccio Mobile First) */
.alignleft, .alignright, .aligncenter {
    display: block;
    float: none !important;
    margin: 0 auto 20px auto !important;
    clear: both;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.wp-caption img {
    margin: 0 auto;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 5px 10px;
    margin: 0;
}

/* E. Adattamenti per Schermi Molto Piccoli (< 480px) */
@media screen and (max-width: 480px) {
    .search-field-big { font-size: 1.5rem; }
    .related-section { margin-top: 40px; padding-top: 20px; }
    .entry-title-big, .ph-title, .hero-title { 
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto; 
    }
}

/* F. Ripristino dei Float Classici di WordPress solo da Tablet in su (> 768px) */
@media (min-width: 768px) {
    .alignleft {
        float: left !important;
        margin: 5px 20px 20px 0 !important;
    }
    
    .alignright {
        float: right !important;
        margin: 5px 0 20px 20px !important;
    }
    
    .search-field-big { font-size: 2.5rem; }
    .related-section { margin-top: 80px; padding-top: 40px; }
}

/* =========================================
   8. PREMIUM RELATED POSTS (CAROUSEL E GRIGLIE)
   ========================================= */

.premium-related-wrap {
    margin-top: 60px;
    padding: 60px 0;
    background-color: #f4f6f8; 
    border-top: 1px solid var(--border-color);
}

/* Mobile Base: Swipe Orizzontale (Scroll Snap) */
.related-carousel {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding-bottom: 20px; 
}

.related-carousel::-webkit-scrollbar { 
    display: none; 
}

/* Card Correlati Mobile */
.related-card {
    flex: 0 0 85%; /* Fa intravvedere il margine della prossima card */
    width: 85%;
    scroll-snap-align: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-current);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.related-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-media img {
    transform: scale(1.05);
}

.related-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.related-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-title-small {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.related-title-small a {
    color: var(--text-primary);
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.related-cta {
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--accent);
}

.related-cta:hover {
    color: var(--accent);
}

/* Override per Tablet (Griglia 2 col, passa a dinamica su desktop) */
@media (min-width: 768px) {
    .related-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        padding-bottom: 0;
        justify-content: center;
    }
    .related-card {
        flex: auto;
        width: 100%;
        scroll-snap-align: none;
    }
}

/* Override per Desktop (Griglia dinamica basata sull'impostazione plugin) */
@media (min-width: 1024px) {
    .related-carousel {
        grid-template-columns: repeat(var(--related-cols, 4), 1fr);
        justify-content: center;
        justify-items: center;
    }
    /* Centra i box quando sono meno delle colonne configurate */
    .related-carousel.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 340px));
    }
    .related-carousel.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 480px));
    }
}

/* =========================================
   9. COMMENTS SECTION — Premium Design
   ========================================= */

/* Area principale */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Header contatore */
.comments-header {
    margin-bottom: 32px;
}
.comments-title {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.comments-title i {
    color: var(--accent);
    font-size: 1.3rem;
}
.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50px;
    padding: 2px 10px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Lista commenti */
.comment-list,
.comment-list .children {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card singolo commento */
.af-comment-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0;
    transition: box-shadow 0.25s ease;
    overflow: visible;
}
.af-comment-card:hover {
    box-shadow: var(--shadow-soft);
}

/* Commenti nidificati (risposta) */
.af-comment-card.is-reply {
    margin-top: 16px;
    margin-left: 48px;
    border-left: 3px solid var(--accent);
    border-radius: 0 14px 14px 0;
    background: #fafafa;
}

/* Layout interno: avatar + corpo */
.af-comment-inner {
    display: flex;
    gap: 16px;
    padding: 22px 24px;
    position: relative;
}

/* Linea verticale per thread nidificato */
.af-comment-thread-line {
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.5;
}

/* Avatar */
.af-comment-avatar {
    flex-shrink: 0;
}
.af-avatar,
.af-comment-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #f1f3f4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    object-fit: cover;
}

/* Corpo del commento */
.af-comment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Header (nome, data, badge) */
.af-comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.af-comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.af-comment-author {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.af-author-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 50px;
}
.af-author-badge i { font-size: 0.65rem; }
.af-comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.af-comment-pending {
    font-size: 0.78rem;
    color: #f59e0b;
    font-weight: 600;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 50px;
    padding: 2px 10px;
}

/* Testo del commento */
.af-comment-text {
    font-size: 0.97rem;
    line-height: 1.7;
    color: #374151;
}
.af-comment-text p { margin: 0 0 0.6em; }
.af-comment-text p:last-child { margin-bottom: 0; }

/* Azioni (rispondi, modifica) */
.af-comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 6px;
}
.af-reply-link a,
.af-edit-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}
.af-reply-link a:hover { color: var(--accent); }
.af-edit-link a:hover  { color: var(--text-primary); }

/* Navigazione commenti */
.comment-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.comment-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    transition: color 0.2s;
}
.comment-navigation a:hover { color: var(--accent); }

/* Messaggio "commenti chiusi" */
.no-comments-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.no-comments-notice i { font-size: 1.4rem; color: #9ca3af; }

/* ---- FORM COMMENTO ---- */
.af-comment-form {
    margin-top: 50px;
}
.comment-form h3,
#respond h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#respond h3 i { color: var(--accent); }

/* Griglia campi (nome/email/url su desktop) */
.af-comment-fields-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 0;
}

/* Singolo campo form */
.af-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.af-form-field--full {
    grid-column: 1 / -1;
}
.af-form-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.af-form-field label i { color: var(--accent); font-size: 0.8rem; }
.required { color: var(--accent); }

.af-form-field input[type="text"],
.af-form-field input[type="email"],
.af-form-field input[type="url"],
.af-form-field textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
}
.af-form-field input:focus,
.af-form-field textarea:focus,
#respond input:focus,
#respond textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}
#respond textarea { resize: vertical; min-height: 140px; }

/* Pulsante invio */
.af-comment-submit,
#respond .af-comment-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 13px 32px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}
.af-comment-submit:hover {
    background: #e05e00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 0, 0.35);
}

/* Link "cancella risposta" */
#cancel-comment-reply-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-left: 12px;
    text-decoration: underline;
    transition: color 0.2s;
}
#cancel-comment-reply-link:hover { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (min-width: 640px) {
    .af-comment-fields-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .af-comment-inner { padding: 16px; gap: 12px; }
    .af-avatar, .af-comment-avatar img { width: 44px; height: 44px; }
    .af-comment-card.is-reply { margin-left: 24px; }
    .comments-title { font-size: 1.2rem; }
}

/* =========================================
   10. FLOATING SOCIAL STACK — Circle Design (affinità back-to-top)
   ========================================= */
.social-stack {
    position: fixed !important;
    left: 20px !important;
    bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Nascosto di default: compare solo dopo 300px di scroll (via JS .is-visible) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, bottom 0.35s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    will-change: opacity, transform;
}

.social-stack.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Offset coordinato con la buy bar / sticky bar */
body.has-af-sticky-bar .social-stack,
body.has-sticky-buy-bar .social-stack {
    bottom: 80px !important;
}

/* Hide auto-inserted WordPress formatting */
.social-stack br,
.social-stack p,
.social-pill br,
.social-pill p {
    display: none !important;
}

.social-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important; /* Cerchio perfetto — affinità back-to-top */
    padding: 0 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
    background-color: transparent !important;
    flex-shrink: 0;
}

.social-pill:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.social-pill:active {
    transform: translateY(-1px) !important;
}

.telegram-pill {
    background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%) !important;
}
.telegram-pill:hover {
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.4) !important;
}

.facebook-pill {
    background: linear-gradient(135deg, #1877f2 0%, #0866ff 100%) !important;
}
.facebook-pill:hover {
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4) !important;
}

.pill-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pill-icon img,
.pill-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    object-fit: contain !important;
    margin: 0 !important;
    fill: #ffffff !important;
}

/* Nascondi il testo — affinità estetica con il back-to-top */
.pill-text {
    display: none !important;
}

/* Responsive adjustment for Mobile */
@media screen and (max-width: 576px) {
    .social-stack {
        left: 15px !important;
        bottom: 15px !important;
        gap: 8px !important;
    }
    body.has-af-sticky-bar .social-stack,
    body.has-sticky-buy-bar .social-stack {
        bottom: 80px !important;
    }
    .social-pill {
        width: 40px !important;
        height: 40px !important;
    }
    .pill-icon {
        width: 18px !important;
        height: 18px !important;
    }
    .pill-icon img,
    .pill-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* =========================================
   11. FINAL CTA BOX
   ========================================= */
.final-cta-box {
    margin: 40px auto !important;
    padding: 35px 30px !important;
    background: linear-gradient(135deg, #1e2022 0%, #111215 100%) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25) !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    max-width: 800px !important;
}

/* Subtle accent background glow */
.final-cta-box::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: radial-gradient(circle, rgba(255, 105, 0, 0.08) 0%, transparent 60%) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Hide auto-inserted WordPress formatting */
.final-cta-box br,
.final-cta-buttons br,
.cta-btn br,
.final-cta-box p br {
    display: none !important;
}

.final-cta-box p {
    margin-bottom: 0 !important; /* Overriding default paragraph margins */
}

.final-cta-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    margin-bottom: 25px !important;
    position: relative !important;
    z-index: 1 !important;
    line-height: 1.4 !important;
}

.final-cta-buttons {
    display: flex !important;
    gap: 16px !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    position: relative !important;
    z-index: 1 !important;
}

.cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 14px 28px !important;
    border-radius: 50px !important;
    font-family: var(--font-main) !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.3s ease !important;
    min-width: 210px !important;
    margin: 0 !important;
    background-color: transparent !important;
}

.cta-btn img {
    width: 18px !important;
    height: 18px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

.cta-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.cta-btn:active {
    transform: translateY(-1px) scale(1) !important;
}

/* Button 1: Live Feed */
.btn-live {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
}
.btn-live:hover {
    box-shadow: 0 8px 25px rgba(255, 75, 43, 0.45) !important;
}

/* Pulse animation for Live button */
.pulse-effect {
    animation: ctaPulse 2s infinite !important;
}

@keyframes ctaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 75, 43, 0.5);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 75, 43, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 75, 43, 0);
    }
}

/* Button 2: Telegram */
.btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #00a2ed 100%) !important;
}
.btn-telegram:hover {
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.45) !important;
}

/* Responsive adjustment for CTA Box */
@media screen and (max-width: 576px) {
    .final-cta-box {
        margin: 30px 15px !important;
        padding: 30px 20px !important;
    }
    .final-cta-title {
        font-size: 1.1rem !important;
        margin-bottom: 20px !important;
    }
    .final-cta-buttons {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    .cta-btn {
        width: 100% !important;
        min-width: unset !important;
        padding: 12px 20px !important;
        font-size: 0.85rem !important;
    }
}


/* =========================================================================
   UX/UI OTTIMIZZAZIONI (Audit Fixes)
   ========================================================================= */

/* Migliora il bottone di acquisto per il Mobile e aumenta il CTR */
.sap-v2-btn {
    background-color: var(--accent, #ff6900) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.sap-v2-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 105, 0, 0.4) !important;
}

@media (max-width: 768px) {
    .sap-v2-btn {
        display: block !important;
        width: 100% !important;
        text-align: center;
        padding: 15px 20px !important;
    }
}

/* Ottimizzazione Visiva dello Sticky Header */
.menu-sticky-wrapper {
    transition: background-color 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
}

.is-position-sticky .menu-sticky-wrapper {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: none;
}

/* =========================================================================
   NATIVE BREADCRUMBS
   ========================================================================= */
.af-breadcrumbs {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.af-breadcrumbs a {
    color: var(--accent, #ff6900);
    text-decoration: none;
    transition: color 0.2s ease;
}

.af-breadcrumbs a:hover {
    color: #333;
    text-decoration: underline;
}

.af-breadcrumbs-separator {
    color: #999;
    font-size: 0.8em;
}

.af-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* =========================================================================
   UX/UI OTTIMIZZAZIONI V2 (Audit Fixes)
   ========================================================================= */

/* Cookie Banner Accessibility Fix */
.af-cookie-banner {
    background-color: #1E293B !important;
    color: #FFFFFF !important;
}
.af-cookie-banner p, .af-cookie-banner a {
    color: #FFFFFF !important;
}
.af-cookie-banner .btn-accept {
    background-color: var(--accent, #ff6900) !important;
    color: #FFFFFF !important;
}

/* Image Aspect Ratio for Search and Archive Cards */
.simple-media img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: #F8FAFC;
    width: 100%;
}

/* CSS Hover Effects (replacing inline JS) */
.archive-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Fix per Live Badge Flottante Sovrapposto */
@media (max-width: 768px) {
    .btn-live-pulse {
        position: relative !important;
        top: auto !important;
        transform: none !important;
        z-index: 10 !important;
        margin: 0 auto;
    }
    
    /* Disattivazione Social Stack (Floating Elements) */
    .social-stack {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Fix per hover pillole categorie e bottoni ricerca (sostituzione JS) */
.btn-cat-pill {
    transition: all 0.2s ease;
}
.btn-cat-pill:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

.search-results-list .btn:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* Stile SVG Logo */
.site-logo-svg {
    max-width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 768px) {
    .site-logo-svg {
        max-width: 200px; /* Più piccolo su mobile per fare spazio */
    }
}

/* Stile per il Logo Utente (Piggy Bank) */
.site-logo-link {
    display: flex !important;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.site-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%; /* Rende l'immagine perfettamente tonda */
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #fff;
}

.site-name-text {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: #1E293B;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.site-name-text .accent {
    color: var(--accent, #ff6900);
}

@media (max-width: 768px) {
    .site-logo-img {
        width: 38px;
        height: 38px;
    }
    .site-name-text {
        font-size: 1.1rem;
    }
}

/* Fix Globale per Live Badge su pagina Live Offerte (Gutenberg Block) */
.live-badge-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 15px auto 25px auto !important;
    display: flex !important;
    justify-content: center !important;
    z-index: 10 !important;
}

/* =========================================================================
   UX/UI FIX: COLORI, FOOTER, MENU MOBILE E COOKIE (Audit V4)
   ========================================================================= */

/* 1. Fix Colori e Protezione Link Visitati (Menu, Titoli, Header e Card MAI blu/viola) */
/* Annullamento della forzatura globale di a:visited */
a {
    color: inherit;
}

/* Titoli dell'Hero Slider e di tutte le Card del portale */
.hero-title a,
.wc-main-story .wc-main-title a,
.wc-small-title a,
.wc-cat-title a,
.archive-card .wc-small-title a,
.card-content h2 a,
.entry-title a,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: var(--text-primary, #1e293b) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.hero-title a:visited,
.wc-main-story .wc-main-title a:visited,
.wc-small-title a:visited,
.wc-cat-title a:visited,
.archive-card .wc-small-title a:visited,
.card-content h2 a:visited,
.entry-title a:visited,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
    color: var(--text-primary, #1e293b) !important;
}

.hero-title a:hover,
.wc-main-story:hover .wc-main-title a,
.wc-small-card:hover .wc-small-title a,
.archive-card:hover h2 a,
.card-content h2 a:hover,
.entry-title a:hover,
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    color: var(--accent, #ff6900) !important;
}

/* Menu Navigazione Desktop e Mobile */
.blocksy-menu > li > a,
.mobile-menu-list > li > a,
.mobile-sub-bar li a {
    color: var(--text-secondary, #475569) !important;
    text-decoration: none !important;
}

.blocksy-menu > li > a:visited,
.mobile-menu-list > li > a:visited,
.mobile-sub-bar li a:visited {
    color: var(--text-secondary, #475569) !important;
}

.blocksy-menu > li > a:hover,
.blocksy-menu > li.current-menu-item > a,
.mobile-menu-list > li > a:hover,
.mobile-menu-list > li.current-menu-item > a {
    color: var(--text-primary, #0f172a) !important;
    border-bottom-color: var(--accent, #ff6900) !important;
}

/* Link Sezione Categorie ('Vedi tutti') */
.wc-cat-link {
    color: var(--text-secondary, #64748b) !important;
    text-decoration: none !important;
}
.wc-cat-link:visited {
    color: var(--text-secondary, #64748b) !important;
}
.wc-cat-link:hover {
    color: var(--accent, #ff6900) !important;
}

/* Pulsanti e CTA: mai alterati da :visited */
.hero-btn-read,
.hero-btn-read:visited,
.btn,
.btn:visited,
.btn-amazon-cta,
.btn-amazon-cta:visited,
.sap-v2-btn,
.sap-v2-btn:visited {
    color: #ffffff !important;
}

/* 2. Pulizia Liste Footer */
.footer-widget ul,
.footer-widget ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.footer-widget ul li {
    margin-bottom: 8px;
}
.footer-widget ul li a {
    text-decoration: none;
    color: var(--text-secondary);
}
.footer-widget ul li a:hover {
    color: var(--accent);
}

/* 3. Fade Orizzontale Menu Mobile (Affordance Scroll) */
.nav-container, .mobile-scroll-wrapper {
    position: relative;
}
@media (max-width: 991px) {
    .nav-container::after, .mobile-scroll-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 35px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95));
        pointer-events: none;
        z-index: 5;
    }
}

/* 4. Cookie Banner Forzatura Stili WCAG (In caso di override plugin) */
.af-cookie-banner {
    background: #0f172a !important; /* Slate scuro ad alto contrasto */
    color: #f8fafc !important;       /* Bianco caldo leggibile */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
    border-radius: 10px !important;
}
.af-cookie-banner p, .af-cookie-banner-text {
    color: #f8fafc !important;
}
.af-cookie-btn {
    background: #ff6900 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
}
.af-cookie-btn:hover {
    background: #e05d00 !important;
}

/* =========================================================================
   HOMEPAGE FULL-WIDTH & DEALS RIBBONS
   ========================================================================= */
.home-main-fullwidth {
    width: 100%;
    margin-top: 40px;
}

/* Striscia Offerte Lampo tra le Categorie */
.af-deals-ribbon-section {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 45px 0 55px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.af-deals-ribbon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.af-dr-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.af-dr-icon {
    font-size: 1.7rem;
    line-height: 1;
}

.af-dr-title {
    font-size: 1.25rem !important;
    font-weight: 800;
    color: #0f172a;
    margin: 0 !important;
    line-height: 1.2;
}

.af-dr-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 2px 0 0 0;
}

.af-dr-link {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent, #ff6900);
    letter-spacing: 0.03em;
    text-decoration: none !important;
}
.af-dr-link:hover {
    text-decoration: underline !important;
}

/* Griglia Cards Offerte */
.af-deals-ribbon-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.af-deal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.af-deal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--accent, #ff6900);
}

.af-dc-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.af-dc-media a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.af-dc-media img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.af-deal-card:hover .af-dc-media img {
    transform: scale(1.04);
}

.af-dc-badge-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 3px 8px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
    z-index: 2;
}

.af-dc-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.af-dc-title {
    font-size: 0.88rem !important;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px 0 !important;
    height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.af-dc-title a {
    color: #1e293b;
    text-decoration: none !important;
}

.af-dc-title a:hover {
    color: var(--accent, #ff6900);
}

.af-dc-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.af-dc-old-price {
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.af-dc-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #b91c1c;
    line-height: 1;
}

.af-dc-prime {
    font-size: 0.72rem;
    font-weight: 800;
    color: #007185;
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 4px;
}

.af-dc-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent, #ff6900);
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(255, 105, 0, 0.25);
    transition: background 0.15s ease, transform 0.15s ease;
}

.af-dc-btn:hover {
    background: #e05d00;
    transform: translateY(-1px);
}

/* Homepage Fullwidth Desktop Grids */
@media (min-width: 992px) {
    .home-main-fullwidth .wc-layout-grid {
        grid-template-columns: 1.6fr 1fr;
        gap: 40px;
    }
    .home-main-fullwidth .simple-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }
}

/* Tablet & Mobile */
@media (max-width: 991px) {
    .af-deals-ribbon-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .af-deals-ribbon-section {
        padding: 16px;
        margin: 35px 0 45px 0;
        border-radius: 12px;
    }
    .af-deals-ribbon-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .af-deals-ribbon-track::-webkit-scrollbar {
        display: none;
    }
    .af-deal-card {
        flex: 0 0 230px;
        scroll-snap-align: start;
    }
}


/* =========================================================================
   27. UNIVERSAL SEARCH FORM & INPUT GROUP
   ========================================================================= */
.af-search-form,
.search-form {
    width: 100%;
    margin: 0 auto;
}

.af-search-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    background: #ffffff;
    border: 2px solid var(--border-color, #dadce0);
    border-radius: 50px;
    padding: 4px 6px 4px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.af-search-input-wrap:focus-within {
    border-color: var(--accent, #ff6900);
    box-shadow: 0 0 0 4px rgba(255, 105, 0, 0.15), 0 4px 14px rgba(0, 0, 0, 0.08);
}

.af-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    margin-right: 12px;
    flex-shrink: 0;
}

.af-search-input-wrap:focus-within .af-search-icon {
    color: var(--accent, #ff6900);
}

.af-search-field,
.search-form .search-field {
    flex: 1 1 auto;
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary, #202124);
    padding: 10px 8px 10px 0;
    box-shadow: none !important;
    -webkit-appearance: none;
}

.af-search-field::placeholder,
.search-form .search-field::placeholder {
    color: #9aa0a6;
    font-weight: 400;
}

.af-search-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent, #ff6900);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(255, 105, 0, 0.25);
}

.af-search-btn:hover {
    background: #e65c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.35);
}

.af-search-btn:active {
    transform: translateY(0);
}

.af-search-btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.af-search-btn:hover .af-search-btn-icon {
    transform: translateX(2px);
}

/* Fallback per search-form standard WordPress */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.search-form label {
    flex: 1 1 240px;
    margin: 0;
}

.search-form .search-field {
    width: 100%;
    border: 2px solid var(--border-color, #dadce0) !important;
    border-radius: 50px;
    padding: 10px 20px;
}

.search-form .search-submit {
    background: var(--accent, #ff6900);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-form .search-submit:hover {
    background: #e65c00;
}

/* =========================================================================
   28. 404 ERROR PAGE ENHANCED
   ========================================================================= */
.af-error-404-container {
    max-width: 960px;
    margin: 30px auto 60px;
}

.af-404-hero {
    text-align: center;
    padding: 60px 30px;
    background: #ffffff;
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 16px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.af-404-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent, #ff6900) 0%, #ff9900 100%);
}

.af-404-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 105, 0, 0.1);
    color: var(--accent, #ff6900);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.af-404-number {
    font-size: clamp(5.5rem, 15vw, 8.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    background: linear-gradient(180deg, #9aa0a6 0%, #e8eaed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    user-select: none;
    margin: 10px 0 15px;
}

.af-404-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary, #202124);
    margin: 0 0 15px;
    line-height: 1.25;
}

.af-404-desc {
    font-size: 1.05rem;
    color: var(--text-secondary, #5f6368);
    max-width: 650px;
    margin: 0 auto 35px;
    line-height: 1.6;
}

.af-404-search-box {
    max-width: 580px;
    margin: 0 auto 35px;
}

.af-quick-categories {
    margin: 30px auto;
    max-width: 720px;
}

.af-quick-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary, #5f6368);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.af-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.af-pill-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: #f8f9fa;
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #202124);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.af-pill-link:hover {
    border-color: var(--accent, #ff6900);
    color: var(--accent, #ff6900);
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.af-pill-count {
    font-size: 0.75rem;
    background: #e8eaed;
    color: #5f6368;
    padding: 2px 7px;
    border-radius: 50px;
    margin-left: 6px;
    font-weight: 500;
}

.af-pill-link:hover .af-pill-count {
    background: rgba(255, 105, 0, 0.15);
    color: var(--accent, #ff6900);
}

.af-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color, #dadce0);
}

.af-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #202124;
    color: #ffffff !important;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.af-btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.af-btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent, #ff6900);
    color: #ffffff !important;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 105, 0, 0.3);
}

.af-btn-accent:hover {
    background: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255, 105, 0, 0.45);
}

/* Fallback Deals Section */
.af-fallback-deals-section {
    margin-top: 50px;
}

.af-fallback-header {
    margin-bottom: 24px;
    text-align: left;
}

.af-fallback-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary, #202124);
    margin: 0;
}

.af-fallback-title svg {
    color: var(--accent, #ff6900);
    flex-shrink: 0;
}

/* Deal Cards Refinement */
.af-deal-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.af-deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.09);
    border-color: #c0c4c9;
}

.af-card-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent, #ff6900);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.af-card-footer {
    margin-top: auto;
    padding-top: 14px;
}

.af-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary, #202124);
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.af-card-btn:hover {
    border-color: var(--accent, #ff6900);
    color: var(--accent, #ff6900);
    background: rgba(255, 105, 0, 0.04);
}

.af-card-btn svg {
    transition: transform 0.2s ease;
}

.af-card-btn:hover svg {
    transform: translateX(3px);
}

/* =========================================================================
   29. ZERO SEARCH RESULTS PAGE ENHANCED
   ========================================================================= */
.af-search-page-header {
    text-align: center;
    padding: 10px 0 30px;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border-color, #dadce0);
}

.af-search-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255, 105, 0, 0.1);
    color: var(--accent, #ff6900);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.af-badge-zero {
    background: #f1f3f4;
    color: #5f6368;
}

.af-search-main-title {
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary, #202124);
    margin: 5px 0 0;
}

.af-search-count {
    color: var(--accent, #ff6900);
}

.af-search-keyword {
    color: var(--accent, #ff6900);
    font-style: italic;
}

.af-no-results-card {
    text-align: center;
    padding: 50px 30px;
    background: #ffffff;
    border: 1px solid var(--border-color, #dadce0);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.af-empty-icon {
    width: 76px;
    height: 76px;
    background: rgba(255, 105, 0, 0.08);
    color: var(--accent, #ff6900);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.af-empty-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--text-primary, #202124);
    margin: 0 0 12px;
}

.af-empty-desc {
    font-size: 1rem;
    color: var(--text-secondary, #5f6368);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.af-empty-search-box {
    max-width: 520px;
    margin: 0 auto 30px;
}

/* Amazon Fallback CTA */
.af-amazon-fallback-box {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border: 2px dashed #ff9900;
    border-radius: 14px;
    padding: 24px 20px;
    max-width: 580px;
    margin: 0 auto 35px;
    text-align: center;
}

.af-amazon-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ff9900;
    color: #111111 !important;
    padding: 14px 26px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 153, 0, 0.35);
    transition: all 0.25s ease;
    border: none;
    width: 100%;
    max-width: 480px;
}

.af-amazon-search-btn:hover {
    background: #f08800;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 153, 0, 0.45);
}

.af-amazon-search-btn svg {
    flex-shrink: 0;
}

.af-amazon-subtext {
    display: block;
    font-size: 0.8rem;
    color: #767676;
    margin-top: 10px;
    line-height: 1.4;
}

/* Search Tips Card */
.af-search-tips-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 580px;
    margin: 0 auto 35px;
    text-align: left;
}

.af-tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary, #202124);
    margin: 0 0 12px;
}

.af-tips-header svg {
    color: var(--accent, #ff6900);
}

.af-tips-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary, #5f6368);
    font-size: 0.88rem;
    line-height: 1.7;
}

.af-search-categories {
    margin-top: 25px;
}

.af-search-cat-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary, #5f6368);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .af-404-hero {
        padding: 40px 18px;
    }
    
    .af-no-results-card {
        padding: 35px 16px;
    }
    
    .af-search-input-wrap {
        padding: 4px 4px 4px 14px;
    }
    
    .af-search-field {
        font-size: 0.92rem;
    }
    
    .af-search-btn {
        padding: 9px 16px;
        font-size: 0.88rem;
    }
    
    .af-404-actions {
        flex-direction: column;
    }
    
    .af-btn-primary,
    .af-btn-accent {
        width: 100%;
        justify-content: center;
    }
    
    .af-amazon-search-btn {
        font-size: 0.92rem;
        padding: 12px 18px;
    }
}

