body {
    background-color: #fdf6e3;
    background-image: url('../img/collage.png');
    background-repeat: no-repeat;
    background-position: center center; /* Centrado horizontal y vertical */
    background-attachment: fixed;
    background-size: cover; /* 👈 Esto asegura que cubra toda la pantalla sin deformarse */

    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    color: #382b18;
    margin: 0;
    transition: background 0.4s;
}

/* Carrito en header alineado y estilizado */
.cart-icon-container {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

.cart-btn {
    background: #ecdcb0;
    border: 2px solid #b68545;
    border-radius: 22px;
    padding: 7px 20px 7px 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #b68545;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    position: relative;
    outline: none;
}
.cart-btn:hover {
    background: #f9e3bc;
    box-shadow: 0 3px 18px #e2c29055;
}
#cart-count {
    background: #fff7e0;
    color: #a37527;
    border-radius: 14px;
    padding: 2px 10px;
    margin-left: 4px;
    font-size: 1.02em;
    font-weight: 900;
    border: 1.2px solid #d9c09a;
    box-shadow: 0 1px 3px #ecdcb0;
    min-width: 24px;
    text-align: center;
    display: inline-block;
}


@media (max-width: 900px) {
    .cart-btn {
        font-size: 1rem;
        padding: 7px 11px 7px 10px;
        min-width: 40px;
        margin-left: 10px;
    }
    .cart-btn #cart-count {
        font-size: 0.95em;
        padding: 2px 5px;
        margin-left: 3px;
    }
}


/* Asegura que el header tenga position:relative si no lo tiene */
.main-header {
    position: sticky;
    top: 0;
    width: 100vw;
    z-index: 99;
    background: #ecdcb0;
    box-shadow: 0 2px 8px #bca16a11;
    position: relative; /* <-- añade esto si no está */
}

/* HEADER STICKY Y RESPONSIVO */
.main-header {
    position: sticky;
    top: 0;
    width: 100vw;
    z-index: 99;
    background: #ecdcb0;
    box-shadow: 0 2px 8px #bca16a11;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4vw 14px 4vw;
    gap: 16px;
    position: relative;
}

.logo-nombre {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #b68545;
    letter-spacing: 1.2px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

.main-nav a {
    text-decoration: none;
    color: #382b18;
    font-weight: 600;
    font-size: 18px;
    transition: color 0.2s;
    position: relative;
}

.main-nav a.active,
.main-nav a:hover {
    color: #b68545;
}

.burger {
    background: none;
    border: none;
    padding: 6px;
    display: none;
    cursor: pointer;
    z-index: 150;
    margin-left: auto;
    margin-right: 0;
    outline: none;
    flex-shrink: 0;
    height: 44px;
    width: 44px;
    justify-content: center;
    align-items: center;
    position: relative;
}
.burger .burger-bar {
    display: block;
    width: 28px;
    height: 4px;
    background: #b68545;
    margin: 5px 0;
    border-radius: 3px;
    transition: 0.35s cubic-bezier(.51,2.4,.51,1);
}
.burger.open .burger-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger.open .burger-bar:nth-child(2) {
    opacity: 0;
}
.burger.open .burger-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* Responsive burger y menú móvil */
/* RESPONSIVE */
@media (max-width: 900px) {
    .header-container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 2vw;
    }
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100vw;
        background: #ecdcb0;
        border-bottom: 1.5px solid #bca16a;
        box-shadow: 0 8px 24px #e2c29033;
        z-index: 99;
        display: none;
        transition: 0.3s;
        opacity: 0;
        pointer-events: none;
    }
    .main-nav.open {
        display: block;
        opacity: 1;
        pointer-events: all;
        animation: fadeInMenu 0.34s;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }
    .burger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 10px;
    }
    
    .search-form {
        width: 90vw;
        margin: 10px 0 0 0;
    }
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-18px);}
    to { opacity: 1; transform: translateY(0);}
}

/* BUSCADOR */
.search-form {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff7e0;
    border-radius: 18px;
    padding: 3px 12px;
    border: 1px solid #e2c290;
    transition: box-shadow 0.2s;
}

.search-form input[type="text"] {
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    padding: 7px 0;
    color: #382b18;
    width: 180px;
    font-family: inherit;
}

.search-form button {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #b68545;
    padding: 4px 2px;
}
