* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #fff0f5;
    margin: 0;
    padding: 0;
}

header {
    background-color: #ffb6c1;
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin: 0;
}

header p {
    margin: 0.3rem 0 0;
    font-size: 1rem;
}


/* Menú horizontal */

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

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

.nav-menu li a:hover {
    color: #880e4f;
}


/* Botón hamburguesa oculto por defecto */

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

.category-btn {
    background-color: #ff69b4;
    color: white;
    margin-right: 8px;
    margin-bottom: 8px;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.category-btn:hover {
    background-color: #ff1493;
}

.btn-add {
    background-color: #ff69b4;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    width: 100%;
}

.btn-add:hover {
    background-color: #ff1493;
}


/* Carrito flotante */

#cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ff69b4;
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

#cart-count {
    font-weight: bold;
    margin-left: 5px;
}


/* Responsive cards */

.card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    min-height: 3em;
    /* para forzar alineación si hay dos líneas de texto */
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-add {
    margin-top: auto;
    /* mantiene el botón abajo */
}


/* Inputs y formulario */

form input,
form select,
form button {
    border-radius: 10px;
    font-size: 0.9rem;
}


/* Resultado mensaje */

#resultado p {
    font-weight: 500;
}


/* Responsive */

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    /* 
  .card-img-top {
    height: 500px;
  } */
    #cart {
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
        padding: 10px 14px;
    }
    .category-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    form .form-control,
    form .form-select,
    form button {
        font-size: 0.85rem;
    }
    form .col-md-3,
    form .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    /* Mostrar botón hamburguesa en móviles */
    .menu-toggle {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        color: white;
    }
    /* Esconde el menú por defecto en móvil */
    .nav-menu {
        display: none;
        flex-direction: column;
        background-color: #f8bbd0;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        z-index: 99;
    }
    /* Cuando está activo (al hacer clic en el botón) */
    .nav-menu.active {
        display: flex;
    }
    .navbar {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
    }
}