/*
Theme Name: Fahrenheit 451 Libreria
Theme URI: https://libreriafahrenheit451roma.it
Author: Fahrenheit 451 Team
Author URI: https://libreriafahrenheit451roma.it
Description: Tema WordPress WooCommerce per la Libreria Fahrenheit 451 di Roma - Campo de' Fiori. Design elegante con supporto completo per e-commerce.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fahrenheit451
Domain Path: /languages
Requires at least: 5.8
Requires PHP: 7.4
Tested up to: 6.4
WC requires at least: 7.0
WC tested up to: 8.0
*/

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px; line-height: 1.6; color: #333; background-color: #fff;
}
a { color: #c41e1e; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #a01818; }
img { max-width: 100%; height: auto; }

/* ========================================
   VARIABLES
   ======================================== */
:root {
    --fahrenheit-orange: #f7941d;
    --fahrenheit-red: #c41e1e;
    --fahrenheit-red-dark: #a01818;
    --fahrenheit-dark: #1a1a1a;
    --fahrenheit-gray: #666;
    --fahrenheit-light-gray: #f5f5f5;
    --fahrenheit-border: #e0e0e0;
}

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
    background-color: var(--fahrenheit-orange);
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}
.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.top-bar-left { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.top-bar-left a { color: #fff; display: flex; align-items: center; gap: 6px; }
.top-bar-left a:hover { text-decoration: underline; }
.top-bar-right { display: flex; gap: 15px; align-items: center; }
.top-bar-social { display: flex; gap: 12px; }
.top-bar-social a { color: #fff; font-size: 16px; }
.top-bar-social a:hover { opacity: 0.8; }
.top-bar-cart { color: #fff; display: flex; align-items: center; gap: 6px; }

/* ========================================
   MAIN HEADER & NAVIGATION
   ======================================== */
.main-header {
    background-color: var(--fahrenheit-red);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 50px; width: auto; }
.site-logo .logo-text { color: #fff; font-size: 24px; font-weight: 700; margin-left: 10px; }

/* Main Navigation */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul { display: flex; list-style: none; gap: 25px; }
.main-navigation a {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}
.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--fahrenheit-orange);
    transition: width 0.3s ease;
}
.main-navigation a:hover::after { width: 100%; }
.main-navigation a:hover { color: var(--fahrenheit-orange); }

/* Mobile Menu */
.mobile-menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.mobile-menu { display: none; position: fixed; top: 0; left: -100%; width: 80%; max-width: 300px; height: 100vh; background: var(--fahrenheit-red); z-index: 1001; padding: 80px 20px 20px; transition: left 0.3s ease; }
.mobile-menu.active { left: 0; }
.mobile-menu ul { list-style: none; }
.mobile-menu li { margin-bottom: 15px; }
.mobile-menu a { color: #fff; font-size: 16px; }
.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.5); z-index: 1000; }
.mobile-menu-overlay.active { display: block; }

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section { position: relative; height: 600px; overflow: hidden; }
.hero-slider { position: relative; height: 100%; }
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.7s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
}
.hero-slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.hero-text { text-align: right; max-width: 600px; padding-right: 40px; }
.hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 15px;
}
.hero-title {
    color: var(--fahrenheit-red);
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.hero-btn {
    display: inline-block;
    border: 2px solid var(--fahrenheit-red);
    color: var(--fahrenheit-red);
    background: rgba(255,255,255,0.9);
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}
.hero-btn:hover { background: var(--fahrenheit-red); color: #fff; }
.hero-quote {
    color: rgba(255,255,255,0.95);
    font-style: italic;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
}
.hero-quote-author { color: rgba(255,255,255,0.8); font-size: 14px; }
.hero-quote-author strong { color: #fff; }

/* Hero Navigation */
.hero-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.hero-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.hero-nav-dot.active { background: var(--fahrenheit-red); }
.hero-nav-dot:hover { background: rgba(255,255,255,0.8); }
.hero-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 3;
    pointer-events: none;
}
.hero-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-arrow:hover { background: rgba(255,255,255,0.4); }

/* ========================================
   SEARCH SECTION
   ======================================== */
.search-section { padding: 40px 0; background: #fff; }
.search-container { max-width: 600px; margin: 0 auto; padding: 0 20px; }
.search-form { position: relative; }
.search-form input {
    width: 100%;
    padding: 18px 25px 18px 55px;
    border: none;
    background: #f5f5f5;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
}
.search-form input:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--fahrenheit-red); }
.search-form button {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services-section { padding: 50px 0; background: #f9f9f9; }
.services-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.service-item { text-align: center; text-decoration: none; }
.service-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    gap: 3px;
}
.service-item:hover .service-icon { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.service-icon--blue  { background: #0066CC; color: #fff; }
.service-icon--red   { background: var(--fahrenheit-red); color: #fff; }
.service-icon--teal  { background: #0099CC; color: #fff; }
.service-icon--gold  { background: #FFD700; color: #222; border: 2px solid #bba000; }
.service-icon i { font-size: 26px; }
.service-icon-num { font-size: 22px; font-weight: 800; line-height: 1; }
.service-icon-label { font-size: 9px; font-weight: 700; text-align: center; line-height: 1.3; text-transform: uppercase; }
.service-icon--gold em { color: var(--fahrenheit-red); font-style: normal; }
.service-title { font-size: 15px; font-weight: 600; color: #333; transition: color 0.3s ease; }
.service-item:hover .service-title { color: var(--fahrenheit-red); }

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products-section { padding: 60px 0; background: #fff; border-top: 4px solid var(--fahrenheit-red); }
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--fahrenheit-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}
.section-quote { font-style: italic; color: #666; max-width: 800px; margin: 0 auto; }
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.products-count { color: #666; font-size: 14px; }
.products-sort select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}
.product-card:hover { box-shadow: 0 5px 25px rgba(0,0,0,0.15); }
.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f5f5f5;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}
.product-card:hover .product-overlay { background: rgba(0,0,0,0.1); }
.product-info { padding: 20px; }
.product-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}
.product-card:hover .product-title { color: var(--fahrenheit-red); }
.product-price { font-size: 18px; font-weight: 700; color: var(--fahrenheit-red); }
.product-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 18px;
    background: var(--fahrenheit-red);
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}
.product-btn:hover { background: #a01818; color: #fff; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}
.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
}
.pagination a:hover { background: #f5f5f5; border-color: #ccc; }
.pagination .current { background: var(--fahrenheit-red); border-color: var(--fahrenheit-red); color: #fff; }
.view-all { text-align: center; margin-top: 25px; }
.view-all a { color: var(--fahrenheit-red); font-weight: 500; text-decoration: underline; }

/* ========================================
   CATEGORIES SECTION
   ======================================== */
.categories-section { padding: 60px 0; background: #f9f9f9; }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.category-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}
.category-card:hover { box-shadow: 0 5px 25px rgba(0,0,0,0.15); }
.category-image { aspect-ratio: 4/3; overflow: hidden; }
.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.category-card:hover .category-image img { transform: scale(1.05); }
.category-content { padding: 25px; text-align: center; }
.category-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fahrenheit-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}
.category-quote { font-style: italic; color: #666; font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.category-source { color: #999; font-size: 12px; }

/* ========================================
   RARE BOOKS SECTION
   ======================================== */
.rare-books-section { padding: 60px 0; background: #fff; }
.rare-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--fahrenheit-red);
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ========================================
   VIDEO SECTION
   ======================================== */
.video-section { padding: 60px 0; background: #f5f5f5; }
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.video-item { position: relative; cursor: pointer; }
.video-thumbnail { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; }
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.video-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: var(--fahrenheit-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.video-item:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.1); }
.video-play-btn i { color: #fff; font-size: 24px; margin-left: 5px; }
.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
}
.video-title { margin-top: 15px; font-size: 15px; font-weight: 500; color: #333; text-align: center; }

/* Events */
.events-section { margin-top: 50px; }
.events-empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}
.events-empty i { font-size: 48px; color: #ddd; display: block; margin-bottom: 16px; }
.events-empty p { font-size: 16px; color: #888; margin-bottom: 12px; }
.btn-add-event {
    display: inline-block;
    padding: 8px 20px;
    background: var(--fahrenheit-red);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s;
}
.btn-add-event:hover { background: #a01818; color: #fff; }

/* ========================================
   PARTNERS SECTION
   ======================================== */
.partners-section { padding: 60px 0; background: #fff; }
.partners-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-bottom: 40px; }
.partner-card { background: #f9f9f9; border-radius: 10px; padding: 30px; }
.partner-name { font-size: 18px; font-weight: 700; color: #333; margin-bottom: 5px; }
.partner-type { color: var(--fahrenheit-red); font-weight: 500; margin-bottom: 10px; }
.partner-description { color: #666; font-size: 14px; line-height: 1.6; }
.external-links { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.external-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 500;
}
.external-link::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--fahrenheit-red);
    border-radius: 50%;
}
.external-link:hover { color: var(--fahrenheit-red); }

/* ========================================
   FOOTER
   ======================================== */
.site-footer { background: var(--fahrenheit-red); color: #fff; }
.footer-main { padding: 60px 0; }
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.footer-column h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* Newsletter */
.newsletter-text { color: rgba(255,255,255,0.8); font-size: 14px; margin-bottom: 20px; }
.newsletter-form { display: flex; flex-direction: column; gap: 12px; }
.newsletter-form input {
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,0.15); }
.newsletter-form button {
    padding: 14px 25px;
    background: #fff;
    color: var(--fahrenheit-red);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.newsletter-form button:hover { background: var(--fahrenheit-orange); color: #fff; }

/* Location & Hours */
.footer-address { font-style: normal; color: rgba(255,255,255,0.9); margin-bottom: 25px; line-height: 1.8; }
.hours-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.hours-list { list-style: none; color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.8; }

/* Footer Links */
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.8); font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; margin-top: 25px; }
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}
.footer-social a:hover { background: rgba(255,255,255,0.2); }

/* Footer Bottom */
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding: 20px 0; }
.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* ========================================
   WOOCOMMERCE STYLES
   ======================================== */
.woocommerce-breadcrumb { padding: 20px 0; color: #666; font-size: 14px; }
.woocommerce-breadcrumb a { color: var(--fahrenheit-red); }

/* Shop Page */
.shop-header { margin-bottom: 30px; }
.shop-header .page-title { font-size: 32px; margin-bottom: 20px; }
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

/* Products Loop */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
    width: 100% !important;
    float: none;
    margin: 0;
}

/* Single Product */
.single-product .product { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.single-product .product .woocommerce-product-gallery { position: relative; }
.single-product .product .woocommerce-product-gallery__image img {
    width: 100%;
    border-radius: 10px;
}
.single-product .product .summary { padding: 20px 0; }
.single-product .product .product_title { font-size: 32px; font-weight: 700; color: #333; margin-bottom: 15px; }
.single-product .product .price { font-size: 28px; font-weight: 700; color: var(--fahrenheit-red); margin-bottom: 25px; }
.single-product .product .woocommerce-product-details__short-description { color: #666; line-height: 1.8; margin-bottom: 25px; }
.single-product .product .quantity { margin-bottom: 20px; }
.single-product .product .quantity input {
    width: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}
.single-product .product .single_add_to_cart_button {
    padding: 15px 40px;
    background: var(--fahrenheit-red);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}
.single-product .product .single_add_to_cart_button:hover { background: var(--fahrenheit-red-dark); }

/* Cart */
.woocommerce-cart table.shop_table { width: 100%; border-collapse: collapse; }
.woocommerce-cart table.shop_table th {
    background: #f5f5f5;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}
.woocommerce-cart table.shop_table td { padding: 20px 15px; border-bottom: 1px solid #eee; }
.woocommerce-cart .product-remove a { color: #999; font-size: 20px; }
.woocommerce-cart .product-remove a:hover { color: var(--fahrenheit-red); }
.woocommerce-cart .product-thumbnail img { width: 80px; border-radius: 5px; }
.woocommerce-cart .product-name a { color: #333; font-weight: 500; }
.woocommerce-cart .product-name a:hover { color: var(--fahrenheit-red); }
.woocommerce-cart .product-price,
.woocommerce-cart .product-subtotal { font-weight: 600; color: var(--fahrenheit-red); }
.woocommerce-cart .quantity input { width: 60px; padding: 8px; border: 1px solid #ddd; border-radius: 5px; }
.woocommerce-cart .cart_totals { background: #f9f9f9; padding: 30px; border-radius: 10px; }
.woocommerce-cart .cart_totals h2 { font-size: 20px; margin-bottom: 20px; }
.woocommerce-cart .cart_totals .order-total { font-size: 18px; font-weight: 700; color: var(--fahrenheit-red); }
.woocommerce-cart .checkout-button {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--fahrenheit-red);
    color: #fff;
    text-align: center;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s ease;
}
.woocommerce-cart .checkout-button:hover { background: var(--fahrenheit-red-dark); }

/* Checkout */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}
.woocommerce-checkout h3 { font-size: 20px; margin-bottom: 20px; }
.woocommerce-checkout .form-row { margin-bottom: 20px; }
.woocommerce-checkout label { display: block; margin-bottom: 8px; font-weight: 500; }
.woocommerce-checkout input,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus { outline: none; border-color: var(--fahrenheit-red); }
.woocommerce-checkout #place_order {
    padding: 15px 50px;
    background: var(--fahrenheit-red);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}
.woocommerce-checkout #place_order:hover { background: var(--fahrenheit-red-dark); }

/* My Account */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.woocommerce-account .woocommerce-MyAccount-navigation a {
    color: #666;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    background: var(--fahrenheit-red);
    color: #fff;
}

/* Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; }
.woocommerce-message { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.woocommerce-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.woocommerce-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.woocommerce-message .button {
    float: right;
    padding: 8px 20px;
    background: var(--fahrenheit-red);
    color: #fff;
    border-radius: 5px;
    font-size: 13px;
}

/* Sale Badge */
.woocommerce span.onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--fahrenheit-red);
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

/* Star Rating */
.woocommerce .star-rating { color: var(--fahrenheit-orange); }

/* Tabs */
.woocommerce-tabs { margin-top: 40px; }
.woocommerce-tabs .tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 25px; }
.woocommerce-tabs .tabs li { margin-right: 30px; }
.woocommerce-tabs .tabs a {
    display: block;
    padding: 15px 0;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.woocommerce-tabs .tabs li.active a { color: var(--fahrenheit-red); border-bottom-color: var(--fahrenheit-red); }

/* Related Products */
.related.products { margin-top: 50px; }
.related.products h2 { font-size: 24px; margin-bottom: 25px; color: #333; }

/* ========================================
   NOTIFICATION
   ======================================== */
.fahrenheit-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}
.fahrenheit-notification.show { transform: translateY(0); opacity: 1; }
.fahrenheit-notification.success { background: #28a745; }
.fahrenheit-notification.error { background: #dc3545; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .services-grid,
    .products-grid,
    .categories-grid,
    .videos-grid { grid-template-columns: repeat(2, 1fr); }
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .top-bar-container { flex-direction: column; text-align: center; }
    .top-bar-left { justify-content: center; }
    .hide-mobile { display: none; }
    .mobile-menu-toggle { display: block; }
    .main-navigation { display: none; }
    .hero-section { height: 500px; }
    .hero-title { font-size: 36px; }
    .hero-content { justify-content: center; }
    .hero-text { text-align: center; padding: 0 20px; }
    .services-grid,
    .products-grid,
    .categories-grid,
    .videos-grid,
    .partners-grid { grid-template-columns: 1fr; }
    .woocommerce ul.products { grid-template-columns: 1fr; }
    .single-product .product { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
    .footer-bottom-container { flex-direction: column; text-align: center; gap: 10px; }
    .products-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 28px; }
    .section-title { font-size: 22px; }
}

/* ============================================================
   SEZIONE EVENTI
   ============================================================ */
.events-section-hp { padding: 60px 0; background: #fafafa; }
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 30px; }
.event-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.event-image img { width: 100%; height: 180px; object-fit: cover; }
.event-info { display: flex; gap: 16px; padding: 18px; align-items: flex-start; }
.event-date { display: flex; flex-direction: column; align-items: center; min-width: 48px; background: #c41e1e; color: #fff; border-radius: 6px; padding: 8px 6px; }
.event-day { font-size: 26px; font-weight: 700; line-height: 1; }
.event-month { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.event-title a { font-weight: 600; color: #1a1a1a; text-decoration: none; font-size: 15px; }
.event-title a:hover { color: #c41e1e; }
.event-time, .event-venue { color: #666; font-size: 13px; margin: 4px 0 0; }
.event-time i, .event-venue i { color: #c41e1e; margin-right: 5px; }
.events-empty { text-align: center; padding: 48px 20px; color: #888; font-size: 16px; }
.events-empty i { font-size: 40px; margin-bottom: 12px; display: block; color: #c41e1e; }

/* ============================================================
   SEZIONE VIDEO YOUTUBE
   ============================================================ */
.youtube-embed-fallback { text-align: center; padding: 40px 20px; }
.youtube-channel-link { display: inline-flex; align-items: center; gap: 14px; background: #c41e1e; color: #fff; padding: 18px 32px; border-radius: 8px; text-decoration: none; font-size: 17px; font-weight: 600; transition: background .2s; }
.youtube-channel-link:hover { background: #a01818; color: #fff; }
.youtube-channel-link i { font-size: 28px; }

/* YouTube admin note */
.admin-yt-note { color: #888; font-size: 12px; margin-top: 15px; text-align: center; }
.admin-yt-note a { color: #c41e1e; }

/* ============================================================
   FIX LARGHEZZA FULL-WIDTH + FOOTER PARTNER CON IMMAGINI
   ============================================================ */
/* Rimuove eventuali wrapper che stringono il contenuto */
#main-content { width: 100%; max-width: 100%; padding: 0; margin: 0; }
.hero-section, .search-section, .services-section,
.products-section, .categories-section, .rare-books-section,
.events-section-hp, .video-section, .partners-section { width: 100%; }

/* Aumenta max-width contenitori a 1400px per schermi grandi */
.section-container,
.services-container,
.footer-container,
.footer-bottom-container,
.header-container,
.top-bar-container { max-width: 1400px; }

/* Fix hero background full-width */
.hero-slider, .hero-slide, .hero-slide-bg { width: 100vw; max-width: 100%; }

/* ── FOOTER PARTNER CON IMMAGINI ── */
.footer-partner-logos { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 20px; }
.footer-partner-logo-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-partner-logo-item a { display: block; }
.footer-partner-logo-item img { max-height: 50px; max-width: 120px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.8; transition: opacity .2s; }
.footer-partner-logo-item img:hover { opacity: 1; }
.footer-partner-logo-item span { color: rgba(255,255,255,0.7); font-size: 12px; }

/* YouTube admin note */
.admin-yt-note { color: #888; font-size: 12px; margin-top: 15px; text-align: center; }
.admin-yt-note a { color: #c41e1e; }

@media (max-width: 768px) {
    .footer-partner-logos { justify-content: center; }
}

/* ── FOOTER PARTNER BAR ───────────────────────────── */
.footer-partners-bar {
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 20px 0;
}
.footer-partners-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}
.footer-partners-container::before {
    content: 'I nostri partner:';
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    white-space: nowrap;
}
.footer-partner-logo-item a {
    display: flex;
    align-items: center;
}
.footer-partner-logo-item img {
    max-height: 40px;
    max-width: 110px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.75;
    transition: opacity .2s;
}
.footer-partner-logo-item img:hover { opacity: 1; }
.footer-partner-logo-item span {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    font-weight: 600;
    transition: color .2s;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 12px;
    border-radius: 4px;
}
.footer-partner-logo-item span:hover { color: #fff; border-color: rgba(255,255,255,0.7); }
@media (max-width: 600px) {
    .footer-partners-container { justify-content: center; }
    .footer-partners-container::before { width: 100%; text-align: center; }
}

/* ── VIDEO IFRAME RESPONSIVE ─────────────────────── */
.video-iframe-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.video-iframe-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}
@media (max-width: 768px) {
    .videos-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
    .videos-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── PARTNER PRINCIPALE (layout logo + galleria) ── */
.partner-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 30px;
}
.partner-main-logo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.partner-logo-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border: 3px solid #d4a017;
    border-radius: 4px;
}
.partner-name-text {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}
.partner-main-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}
.partner-main-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.partner-gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    transition: opacity .2s;
}
.partner-gallery-item img:hover { opacity: 0.85; }

.partner-full-desc {
    margin-top: 28px;
    font-style: italic;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.9;
    color: #222;
    text-align: justify;
    border-left: 4px solid #d4a017;
    padding-left: 20px;
}

/* ── BARRA PARTNER ESTERNI (full-width, solo loghi) ── */
.external-partners-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 30px 40px;
    margin-top: 40px;
    background: #f7f7f7;
    border-top: 3px solid #d4a017;
    gap: 20px;
}
.ext-partner-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    transition: opacity .2s;
}
.ext-partner-item:hover { opacity: 0.7; }
.ext-partner-item img {
    max-height: 60px;
    max-width: 160px;
    object-fit: contain;
}
.ext-partner-item span {
    font-size: 18px;
    font-weight: 700;
    color: #555;
    text-align: center;
}

@media (max-width: 768px) {
    .partner-main-layout { grid-template-columns: 1fr; }
    .partner-main-gallery { grid-template-columns: repeat(2, 1fr); }
    .external-partners-bar { flex-direction: column; padding: 20px; }
    .ext-partner-item img { max-height: 50px; }
}
