:root {
    --primary: #2c3e50;
    --secondary: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 6px;
}

/* Top Bar */
.top-bar {
    background: #34495e;
    color: white;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 1rem;
}

.top-links {
    display: flex;
    gap: 1rem;
}

.top-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.top-links a:hover {
    color: white;
}

/* Header principal */
.main-header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.logo .highlight {
    color: var(--secondary);
}

.logo .tagline {
    font-size: 0.8rem;
    color: #bdc3c7;
    margin: 0;
}

.search-bar {
    flex: 1;
    max-width: 400px;
}

.search-bar form {
    display: flex;
    background: white;
    border-radius: 25px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
}

.search-bar button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #c0392b;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    position: relative;
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.action-btn:hover {
    background: rgba(255,255,255,0.1);
}

.action-btn .count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Navigation principale */
.main-nav {
    background: #34495e;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: background 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--secondary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    color: #333;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--secondary);
}

.dropdown-menu .see-all {
    font-weight: bold;
    color: var(--secondary);
    border-bottom: none;
}

/* Messages flash */
.flash-messages {
    margin: 1rem 0;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: var(--success);
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: var(--warning);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary), #34495e);
    color: white;
    padding: 3rem 0;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.newsletter-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-form .form-group {
    display: flex;
    margin-bottom: 1rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.newsletter-form button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #c0392b;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.form-check input {
    margin: 0;
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.contact-info i {
    color: var(--secondary);
    width: 16px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    margin-top: 2rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.payment-methods i {
    color: #bdc3c7;
    transition: color 0.3s;
}

.payment-methods i:hover {
    color: white;
}

.copyright {
    text-align: right;
    color: #95a5a6;
    font-size: 0.9rem;
}

.copyright p {
    margin-bottom: 0.25rem;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        max-width: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #34495e;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #2c3e50;
    }
    
    .dropdown-menu a {
        color: white;
        padding-left: 2rem;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .copyright {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .user-actions {
        gap: 0.5rem;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        border-radius: 5px;
        margin-bottom: 1rem;
    }
    
    .newsletter-form button {
        border-radius: 5px;
    }
    
    .payment-methods {
        justify-content: center;
    }
}