/* Reset básico */
body {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Encabezados */
h2 {
    color: #333;
    text-align: center;
    margin: 20px 0;
}

/* Formularios */
form {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

/* Catálogo en grilla */
.catalogo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 10px;
}

/* Tarjeta de producto */
.producto {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.producto img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.producto h3 {
    font-size: 16px;
    margin: 5px 0;
}

.producto p {
    margin: 5px 0;
    font-weight: bold;
    color: #007b00;
}

/* Botones generales */
button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    width: 100%;
}

button:hover {
    background: #0056b3;
}

/* Carrito normal */
#carrito {
    background: #fff;
    margin: 15px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Ítems del carrito */
.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
}

/* Control de cantidad (catálogo y carrito) */
.cantidad-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.cantidad-control span {
    font-size: 16px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

/* Botones cantidad */
.btn-mas, .btn-menos {
    border: none;
    border-radius: 6px; /* cuadrados con esquinas redondeadas */
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-mas {
    background: #28a745; /* verde */
}

.btn-mas:hover {
    background: #218838;
}

.btn-menos {
    background: #dc3545; /* rojo */
}

.btn-menos:hover {
    background: #c82333;
}

#carrito strong {
    font-size: 16px;
    color: #222;
}

/* Carrito sticky en móvil */
#carrito-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #007bff;
    padding: 10px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

#carrito-sticky strong {
    font-size: 16px;
    color: #222;
}

#carrito-sticky button {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#carrito-sticky button:hover {
    background: #218838;
}

#negocio-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #000, #111); /* fondo negro elegante */
    color: #fff;
    display: flex;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    z-index: 2000;
}

#negocio-header img {
    height: 60px;
    margin-right: 20px;
}

#negocio-header .header-text h1 {
    font-size: 26px;
    margin: 0;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffcc00; /* dorado para destacar */
}

#negocio-header .header-text p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #ddd; /* gris claro para contraste */
}

#carrito-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000; /* fondo negro elegante */
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.4);
    font-family: Arial, sans-serif;
}

#carrito-sticky strong {
    color: #ffcc00; /* amarillo dorado */
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}


/* Responsive */
@media (max-width: 600px) {
    .catalogo {
        grid-template-columns: 1fr 1fr;
    }
    .producto img {
        height: 120px;
    }
}

/* Responsive avanzado para móviles */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* texto más grande en móvil */
    }

    .catalogo {
        grid-template-columns: 1fr; /* un producto por fila en vertical */
        gap: 20px;
    }

    .producto {
        padding: 20px;
        font-size: 1rem;
    }

    .producto img {
        height: auto;
        max-height: 200px;
        width: 100%;
    }

    .producto h3 {
        font-size: 18px;
    }

    .producto p {
        font-size: 16px;
    }

    /* Botones más grandes y táctiles */
    button, .btn-mas, .btn-menos {
        font-size: 18px;
        padding: 14px;
        height: auto;
        min-height: 44px; /* estándar táctil */
    }

    .cantidad-control span {
        font-size: 18px;
    }

    /* Sticky optimizado */
    #carrito-sticky {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 15px;
    }

    #carrito-sticky strong {
        font-size: 20px;
        margin-bottom: 10px;
    }

    #carrito-sticky button {
        font-size: 18px;
        padding: 14px;
        width: 100%;
    }
}