/* templates/style_imagefocus.css - Tema Focus Immagine v1.1 */
:root {
    --primary-color: #6a1b9a; /* Viola */
    --secondary-color: #ffeb3b; /* Giallo acceso */
    --text-color: #333;
    --bg-color: #f5f5f5; /* Grigio molto chiaro */
    --card-bg: #ffffff;
    --shadow: 0 8px 25px rgba(0,0,0,0.07);
    --border-radius: 8px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding-top: 70px;
}

/* --- Menu --- */
.navbar {
    background: rgba(255, 255, 255, 0.9); /* Leggermente trasparente */
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.75rem 1.5rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand img.nav-logo { max-height: 35px; width: auto; display: block; padding: 5px 0; }
.nav-links-desktop { list-style: none; margin: 0; padding: 0; display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 992px) { .nav-links-desktop { display: flex; } }
.nav-links-desktop a { text-decoration: none; color: var(--text-color); font-weight: 600; transition: color 0.2s ease; }
.nav-links-desktop a:hover { color: var(--primary-color); }
.nav-links-desktop .nav-button a { background-color: var(--secondary-color); color: #333; padding: 0.5rem 1rem; border-radius: 4px; font-weight: 700; border: 1px solid rgba(0,0,0,0.1); }
.nav-links-desktop .nav-button a:hover { background-color: #fdd835; color: #000; }
.navbar-toggler { display: block; background: none; border: 1px solid #ccc; border-radius: 4px; padding: 0.5rem 0.75rem; font-size: 1.5rem; cursor: pointer; line-height: 1; color: var(--text-color); }
@media (min-width: 992px) { .navbar-toggler { display: none; } }
.navbar-collapse { display: none; width: 100%; position: absolute; top: 100%; left: 0; background: var(--card-bg); box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 999; }
.navbar-collapse.show { display: block; }
.nav-links-mobile { list-style: none; margin: 0; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.nav-links-mobile li { width: 100%; }
.nav-links-mobile a { text-decoration: none; color: var(--text-color); font-weight: 600; display: block; padding: 0.75rem 0.5rem; border-radius: 4px; transition: background-color 0.2s ease, color 0.2s ease; }
.nav-links-mobile a:hover { background-color: #f0f0f0; color: var(--primary-color); }
.nav-links-mobile .nav-button { width: 100%; margin-top: 0.5rem; }
.nav-links-mobile .nav-button a { background-color: var(--secondary-color); color: #333; padding: 0.75rem 1rem; border-radius: 4px; font-weight: 700; text-align: center; width: 100%; box-sizing: border-box; }
.nav-links-mobile .nav-button a:hover { background-color: #fdd835; color: #000; }

/* --- Dropdown Menu Styles (Desktop - Fix Hover v2) --- */
.nav-links-desktop .nav-dropdown {
    position: relative;
}
/* Aggiungi uno pseudo-elemento sotto 'Prodotti' per coprire il gap */
.nav-links-desktop .nav-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%; /* Posizionato subito sotto il link 'Prodotti' */
    height: 10px; /* Altezza del buffer, aggiustabile se necessario */
    /* background: rgba(255, 0, 0, 0.2); */ /* DEBUG: Rimuovi commento per vedere l'area del buffer */
}
.nav-links-desktop .nav-dropdown .dropdown-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%; /* Manteniamo top 100% per ora, ::after copre il gap */
    left: 0;
    background-color: var(--card-bg, #fff);
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: var(--border-radius, 8px);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0; /* Rimuovi margine superiore se presente */
    z-index: 1001;
    border: 1px solid #eee;
    max-height: 400px;
    overflow-y: auto;
    transition: visibility 0s linear 0.1s, opacity 0.1s linear;
    pointer-events: none;
}
/* Mostra il menu quando si passa sopra 'Prodotti' O sopra il buffer ::after */
.nav-links-desktop .nav-dropdown:hover .dropdown-menu,
.nav-links-desktop .nav-dropdown:hover::after { /* Aggiunto :hover::after qui */
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
    pointer-events: auto;
}
/* Mantieni il menu visibile se il mouse è sopra il menu stesso */
.nav-links-desktop .nav-dropdown .dropdown-menu:hover {
    visibility: visible;
    opacity: 1;
}
.nav-links-desktop .dropdown-menu a {
    padding: 0.75rem 1.25rem;
    display: block;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-color); /* Colore testo default */
}
.nav-links-desktop .dropdown-menu a:hover {
    background-color: #f0f0f0;
    color: var(--primary-color); /* Colore primario hover */
}

/* Mobile Dropdown (Stili invariati, usa JS per toggle) */
.nav-links-mobile .nav-dropdown-mobile .dropdown-toggle-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.nav-links-mobile .dropdown-menu-mobile {
    list-style: none;
    padding-left: 1.5rem; /* Indentazione */
    margin: 0;
    display: none; /* Nascosto di default */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.nav-links-mobile .dropdown-menu-mobile.show {
    display: block;
    max-height: 500px; /* Altezza massima per animazione */
}
.nav-links-mobile .dropdown-menu-mobile a {
    font-size: 0.9em;
    padding: 0.5rem 0.5rem;
    font-weight: 500;
}
.nav-links-mobile .arrow-down {
    transition: transform 0.3s ease;
}
.nav-links-mobile .dropdown-toggle-mobile.open .arrow-down {
    transform: rotate(180deg);
}

/* --- Layout Grid --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 992px) {
    .container { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
    main { grid-column: 1 / 2; min-width: 0; }
    aside { grid-column: 2 / 3; position: sticky; top: 100px; align-self: start; min-width: 0; }
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

/* --- Hero --- */
.hero {
    display: grid;
    grid-template-columns: 1fr; /* Immagine sopra su mobile */
    gap: 0; /* Nessun gap tra immagine e testo */
    align-items: center;
}
@media (min-width: 768px) {
    .hero { grid-template-columns: 1.5fr 1fr; /* Immagine più larga su desktop */ }
    .hero-image { order: 1; /* Immagine prima su desktop */ }
    .hero-info { order: 2; }
}
.hero-image {
    text-align: center;
    padding: 0; /* Rimuovi padding */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee; /* Sfondo per immagine */
    min-height: 300px;
}
.hero-image img {
    width: 100%; /* Larghezza piena */
    height: auto;
    max-height: 450px; /* Altezza massima */
    border-radius: 0; /* Nessun bordo arrotondato */
    object-fit: cover; /* Taglia per riempire */
    display: block; /* Rimuove spazio sotto */
}
.hero-info { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.hero-info .product-title { font-size: 1.8em; line-height: 1.3; color: #333; margin: 0 0 10px 0; font-weight: 700; }
.hero-summary { font-size: 1.1em; line-height: 1.6; margin-top: 0; margin-bottom: 20px; color: #555; }
.price { font-weight: 700; color: var(--primary-color); line-height: 1.2; margin-bottom: 25px; }
.hero-info .price { font-size: 2.5em; text-align: left; }
.buy-button { display: inline-block; background-color: var(--secondary-color); color: #333; padding: 12px 25px; font-size: 1.1em; font-weight: 700; text-decoration: none; border-radius: 4px; text-align: center; transition: all 0.2s ease; border: none; cursor: pointer; align-self: flex-start; border: 1px solid rgba(0,0,0,0.1); }
.buy-button:hover { background-color: #fdd835; box-shadow: 0 4px 15px rgba(255, 235, 59, 0.4); color: #000; }

/* --- Contenuto --- */
.content { font-size: 1.1em; padding: 30px; word-wrap: break-word; }
.content h1 { font-size: 2.0em; font-weight: 700; line-height: 1.3; color: #111; margin: 0 0 25px 0; }
.content h2 { font-size: 1.7em; font-weight: 600; line-height: 1.4; margin-top: 1.8em; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-color); }
.content h3 { font-size: 1.3em; font-weight: 600; color: #222; margin-top: 1.5em; margin-bottom: 10px; }
.content p { margin-bottom: 1.2em; }
.content strong { color: var(--primary-color); font-weight: 700; }
.content .img-fluid-content { max-width: 100%; height: auto; border-radius: var(--border-radius); margin: 30px auto; display: block; box-shadow: 0 5px 20px rgba(0,0,0,0.1); border: 1px solid #ddd; padding: 3px; background: #fff; }

/* --- Q&A --- */
.qa-section { padding: 30px; }
.qa-section h2 { font-size: 1.8em; margin-bottom: 25px; font-weight: 600; }
.qa-item { margin-bottom: 20px; border-left: 4px solid var(--primary-color); padding-left: 15px; }
.qa-item strong { display: block; font-size: 1.1em; font-weight: 600; margin-bottom: 5px; }

/* --- Sidebar --- */
.sidebar-widget { padding: 25px; }
.sidebar-widget h3 { font-size: 1.5em; font-weight: 600; margin: 0 0 20px 0; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { margin-bottom: 12px; font-size: 1em; line-height: 1.5; }
.sidebar-list li strong { color: #000; display: inline-block; margin-right: 5px; font-weight: 600; }

/* Widget Sidebar "Altri Prodotti Simili" */
.related-products-list a {
    text-decoration: none;
    color: var(--primary-color); /* Viola */
    font-weight: 500;
}
.related-products-list a:hover {
    text-decoration: underline;
    color: #4a0072; /* Viola più scuro per hover */
}

/* --- Widget Prezzo Sidebar --- */
.price-widget .price-sidebar { font-size: 2.0em; margin-bottom: 0; color: var(--primary-color); line-height: 1.2; text-align: center; }
.price-widget-img { max-width: 120px; height: auto; margin-bottom: 15px; border-radius: 6px; border: 1px solid #eee; display: block; margin-left: auto; margin-right: auto; }
.marketplace-item { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; gap: 10px; }
.price-details { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center; flex-wrap: wrap; }
.amazon-logo { font-size: 40px; color: #232F3E; line-height: 1; }
.buy-button-sidebar { width: 100%; box-sizing: border-box; font-size: 1.1em; padding: 12px 20px; }

/* --- Footer --- */
footer { text-align: center; margin-top: 40px; padding: 30px 20px; background: #e0e0e0; color: #555; font-size: 0.9em; }
.footer-content { max-width: 1200px; margin-left: auto; margin-right: auto; }
footer p { margin: 0.5rem 0; }

/* --- Mobile CTA --- */
.mobile-cta-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--card-bg); padding: 1rem; box-shadow: 0 -2px 10px rgba(0,0,0,0.15); z-index: 998; box-sizing: border-box; }
.mobile-cta-bar .buy-button { width: 100%; padding: 1rem; font-size: 1.2em; align-self: center; box-sizing: border-box; }
@media (max-width: 991.98px) {
    .mobile-cta-bar { display: block; }
    body { padding-bottom: 90px; }
}

/* Link interno guida (specifico per template multi) */
.back-to-guide-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color); /* Viola */
    display: inline-block;
    margin-bottom: 15px; /* Spazio sotto */
    font-size: 0.9em;
}
.back-to-guide-link:hover {
    text-decoration: underline;
    color: var(--secondary-color); /* Giallo per hover */
}
/* --- NUOVI STILI PER WIDGET ALTRI PRODOTTI RECENSITI --- */
.related-products-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spazio tra gli elementi */
}

.related-product-item {
    display: grid;
    grid-template-columns: 60px 1fr; /* Immagine piccola e dettagli affiancati */
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd; /* Bordo leggero */
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: #f7f7f7; /* Sfondo leggermente diverso */
}

.related-product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.related-product-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
    background: #fff;
}

.related-product-details {
    overflow: hidden; /* Assicura che il testo non fuoriesca */
}

.related-product-title {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-color); /* Colore del testo principale */
    line-height: 1.3;
    max-height: 2.6em; /* 2 linee di testo */
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.related-product-price {
    font-size: 1em;
    font-weight: 700;
    color: var(--secondary-color); /* Colore per il prezzo */
}
/* --- FINE NUOVI STILI --- */