body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    background: url('fondojuma.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; }

/* ---------- INICIO ---------- */
.banner { text-align: center; margin-top: 5px; margin-bottom: 10px; }
.banner img { width: 280px; max-width: 100%; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

.texto {
    max-width: 800px;
    margin: 20px auto;
    background: rgba(255,255,255,0.85);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 18px;
    line-height: 1.6;
    color: #000;
}

.boton {
    display: block;
    width: 260px;
    max-width: 90%;
    margin: 30px auto;
    padding: 15px;
    background: #0077cc;
    color: white;
    text-align: center;
    font-size: 22px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform .2s, box-shadow .2s;
    box-sizing: border-box;
}
.boton:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }

/* ---------- BOTÓN VOLVER ---------- */
.volver {
    display: inline-block;
    background: #0077cc;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.volver:hover { background: #005fa3; }

/* ---------- ARTÍCULOS (categorías) ---------- */
h1.titulo-articulos {
    text-align: center;
    margin-bottom: 30px;
    color: #0044cc;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 10px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.card {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    text-transform: capitalize;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform .2s, box-shadow .2s;
    color: #0044cc;
    font-weight: bold;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }

/* ---------- CATEGORÍA (galería) ---------- */
h1.titulo-categoria {
    text-transform: capitalize;
    margin-bottom: 20px;
    color: #000;
    border-left: 15px solid var(--color, #bae1ff);
    padding-left: 10px;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    justify-items: center;
    max-width: 900px;
    margin: 20px auto;
    width: 100%;
}

.item {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform .2s;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 5px solid var(--color, #bae1ff);
    cursor: pointer;
}
.item:hover { transform: scale(1.03); }
.item img { display: block; width: 100%; height: 200px; object-fit: cover; border-radius: 8px; }
.item .info { text-align: center; padding: 8px 4px 2px; color: #000; }
.item .nombre { font-weight: bold; }
.item .precio { color: #0044cc; font-weight: bold; font-size: 18px; margin-top: 2px; }

.aviso {
    max-width: 600px;
    margin: 30px auto;
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ---------- MODAL ---------- */
#modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#modal.abierto { display: flex; }

.modal-caja {
    max-width: 90%;
    max-height: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}
#modal-img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}
.modal-info {
    background: white;
    margin-top: 12px;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 480px;
    box-sizing: border-box;
    color: #000;
}
#modal-nombre { font-weight: bold; font-size: 20px; }
#modal-precio { color: #0044cc; font-weight: bold; font-size: 22px; margin-top: 4px; }
#modal-desc { margin-top: 8px; font-size: 15px; line-height: 1.4; white-space: pre-line; }
#modal-wa {
    display: none;
    margin-top: 10px;
    background: #25d366;
    color: white;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: bold;
}

.flecha {
    display: none;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    user-select: none;
    padding: 10px 15px;
    background: rgba(0,0,0,0.35);
    border-radius: 10px;
    z-index: 10000;
}
#prev { left: 10px; }
#next { right: 10px; }

/* ---------- FOOTER ---------- */
footer { margin-top: auto; text-align: center; padding: 20px; }

.footer-box {
    display: inline-block;
    background: rgba(0, 0, 0, 0.55);
    padding: 12px 25px;
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.footer-box a { color: #ffd700; font-weight: bold; }
.footer-box a:hover { text-decoration: underline; }

/* ---------- CELULARES ---------- */
@media (max-width: 600px) {
    h1.titulo-articulos { font-size: 34px; }
    .texto { font-size: 16px; padding: 18px; }
    .galeria { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .item { padding: 6px; border-width: 4px; }
    .item img { height: 140px; }
    .item .precio { font-size: 16px; }
    .flecha { font-size: 34px; padding: 6px 10px; }
    .footer-box { font-size: 15px; padding: 10px 14px; }
}
