/*
Theme Name: Buy Smart Theme
Theme URI: https://xtremecode.eu
Author: Buy Smart
Author URI: https://xtremecode.eu
Description: Tema personalizzato per Buy Smart - Group Buy Manager. Design moderno con header e footer personalizzati, logo ufficiale e colori del brand.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: buy-smart-theme
Tags: e-commerce, group-buy, custom-header, custom-footer, responsive
*/

/* Reset e base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Header personalizzato */
.site-header {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 40px;
}

.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    border: none;
}

.site-logo::after,
.site-logo::before {
    display: none !important;
    content: none !important;
}

.site-logo-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    border: none;
}

.site-logo-link:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.site-logo-img {
    max-height: 70px;
    width: auto;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    padding: 0;
    margin: 0;
    border: none;
}

/* Nascondi menu hamburger su desktop - visibile solo su mobile */
.mobile-menu-toggle {
    display: none;
}

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.main-navigation li {
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: block;
    padding: 14px 24px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.main-navigation a:hover::before {
    left: 100%;
}

.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.main-navigation a:active {
    transform: translateY(-1px);
}

/* Main content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Footer personalizzato */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: #ecf0f1;
    margin-top: 80px;
    border-top: 4px solid #0073aa;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 30px 25px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #ffffff;
    position: relative;
    padding-bottom: 15px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #0073aa;
    border-radius: 2px;
}

.footer-tagline {
    color: #bdc3c7;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

.footer-heading {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #ffffff;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li {
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 25px;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    margin: 0;
    color: #95a5a6;
    font-size: 14px;
}

.footer-powered {
    margin: 0;
    color: #95a5a6;
    font-size: 14px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    /* Header mobile - identico su TUTTE le pagine, inclusa permuta iPhone */
    /* FORZA layout orizzontale: logo a sinistra, hamburger a destra */
    .header-content {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 20px !important;
        padding: 15px 20px !important;
    }
    
    /* Logo sempre a sinistra */
    .site-logo {
        order: 1 !important;
        flex-shrink: 0 !important;
    }
    
    /* Hamburger menu sempre a destra */
    .mobile-menu-toggle {
        order: 2 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 48px !important;
        height: 48px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 12px !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 1001 !important;
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Le tre linee del menu hamburger */
    .mobile-menu-toggle span {
        display: block !important;
        width: 24px !important;
        height: 3px !important;
        background: #ffffff !important;
        border-radius: 2px !important;
        margin: 3px 0 !important;
        transition: all 0.3s ease !important;
    }
    
    /* Animazione quando il menu è attivo */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px) !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px) !important;
    }
    
    /* Nascondi menu desktop su mobile - ma mantieni la struttura per il menu hamburger */
    .main-navigation {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: linear-gradient(135deg, #0073aa 0%, #005177 100%) !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3) !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 10000 !important;
        overflow-y: auto !important;
        padding: 80px 20px 20px 20px !important;
        margin: 0 !important;
        border: none !important;
    }
    
    .main-navigation.active {
        right: 0 !important;
        display: block !important;
    }
    
    .main-navigation ul {
        flex-direction: column !important;
        gap: 12px !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .main-navigation a {
        width: 100% !important;
        min-height: 52px !important;
        padding: 16px 20px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        display: block !important;
        color: #ffffff !important;
        text-decoration: none !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        transition: all 0.3s ease !important;
    }
    
    .main-navigation a:hover {
        background: rgba(255, 255, 255, 0.25) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
    }
    
    /* Overlay menu mobile */
    .mobile-menu-overlay {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9999 !important;
        opacity: 0;
        transition: opacity 0.3s ease !important;
        pointer-events: none !important;
    }
    
    .mobile-menu-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    .site-main {
        padding: 20px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

