/* Header y navegación */
.header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    height: 70px; /* Altura fija para el header */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    width: 180px; /* Aumentado para mejor visibilidad */
    height: 100%;
    padding: 6px 0;
}

.logo a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo:hover img {
    transform: scale(1.02);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.15));
}

/* Menú de navegación */
.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.nav-menu li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu a {
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2E5945;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2E5945;
}

/* Carrito */
.cart-icon {
    position: relative;
    margin-left: 2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: rgba(46, 89, 69, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon:hover {
    background-color: rgba(46, 89, 69, 0.1);
}

.cart-icon i {
    font-size: 1.5rem;
    color: #2E5945;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--verde-principal);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Responsividad */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #ffffff !important;
        background-color: #ffffff !important;
        flex-direction: column;
        padding: 1.5rem 1rem;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        border-top: 2px solid #2E5945;
        z-index: 9999;
        opacity: 1 !important;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        margin: 0;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(46, 89, 69, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1.2rem;
        color: #1a1a1a;
        font-weight: 600;
        background-color: transparent;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-menu a:hover {
        background-color: rgba(46, 89, 69, 0.08);
        color: #2E5945;
        transform: translateX(5px);
    }

    .cart-icon {
        margin-left: auto;
    }
}