/* ===== Reset general ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Fondo de pantalla ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #898989;
    color: #eee;
    padding: 20px;
}

/* Fondo fijo de imagen */
.fondo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.fondo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.8);
}

/* ===== Portada de la tienda ===== */
.ancho-contenido {
    max-width: 1000px;
    margin: 0 auto;
}

.portada img {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* ===== Contenedor de productos ===== */
.contenedor {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

/* ===== Cada tarjeta de producto ===== */
.producto {
    background: linear-gradient(160deg, #232323 0%, #181818 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    width: calc(25% - 20px);
    min-width: 240px;
    padding: 14px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.producto:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 204, 255, 0.45);
}

/* Imágenes y videos del producto */
.producto img,
.producto video {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* Placeholder cuando no hay imagen (ej. verdulería) */
.sin-foto-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #1a3a2a, #0f2419);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(34,197,94,0.25);
}

/* Nombre del producto */
.producto h3 {
    font-size: 1.15rem;
    color: #fff;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

/* Precio */
.producto-precio {
    font-size: 1.25rem;
    color: #25D366;
    font-weight: 800;
    margin-bottom: 12px;
}

/* Botón "Agregar al carrito" (estilo similar a los botones de gestión) */
.producto button {
    background: linear-gradient(135deg, #2f6bff, #38bdf8);
    border: none;
    padding: 8px 16px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 11px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.25s;
    box-shadow: 0 8px 18px -10px rgba(56, 189, 248, 0.8);
}

.producto button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 24px -10px rgba(56, 189, 248, 1);
}

.producto button:active {
    transform: translateY(0) scale(0.985);
}

/* Mensaje de confirmación */
.producto .mensaje {
    color: #25D366;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== Responsive: móviles y pantallas chicas ===== */
@media (max-width: 992px) {
    .producto {
        width: 32%;
    }
}

@media (max-width: 768px) {
    .producto {
        width: 48%;
    }
}

@media (max-width: 480px) {
    .producto {
        width: 100%;
    }

    .producto img,
    .producto video {
        max-height: 280px;
    }

    .portada img {
        width: 100%;
        height: 200px;
    }
}
