* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #05070d, #0b1220, #101a2f);
    color: #f5f7ff;
}

/* HERO */
.hero {
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    background:
        linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
        radial-gradient(circle at top left, rgba(57, 255, 20, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(0, 229, 255, 0.15), transparent 30%);
    border-bottom: 3px solid #39ff14;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.18);
}

.hero-contenido h1 {
    font-size: 3rem;
    color: #39ff14;
    text-shadow: 0 0 8px #39ff14;
}

.hero-contenido p {
    font-size: 1.1rem;
}

/* BOTON CARRITO */
.btn-carrito-flotante {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    background: linear-gradient(90deg, #39ff14, #0fe36f);
    color: #051008;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.25);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-carrito-flotante:hover {
    transform: scale(1.04);
    filter: brightness(1.08);
}

/* CONTENEDOR */
.contenedor {
    width: 92%;
    max-width: 1400px;
    margin: 30px auto;
}

/* PRODUCTOS */
.productos-seccion {
    background: rgba(10, 16, 30, 0.95);
    border: 1px solid #1f2e52;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.08);
}

h2 {
    color: #39ff14;
    margin-bottom: 20px;
    border-left: 5px solid #39ff14;
    padding-left: 12px;
}

/* GRID 4 COLUMNAS */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* TARJETAS */
.tarjeta-producto {
    background: linear-gradient(180deg, #11192d, #0b1220);
    border: 1px solid #223457;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 14px rgba(57, 255, 20, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta-producto:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.2);
}

/* IMAGEN */
.img-producto {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #0a0f1d;
    padding: 10px;
    display: block;
}

/* CONTENIDO */
.contenido-producto {
    padding: 15px;
}

.tarjeta-producto h3 {
    color: #ffffff;
    margin-bottom: 10px;
    min-height: 48px;
}

.tarjeta-producto p {
    color: #c9d4ef;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* PRECIOS */
.precios {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
    flex-wrap: wrap;
}

.precio-normal {
    color: #00e5ff;
    font-weight: bold;
    font-size: 1.1rem;
}

.precio-original {
    text-decoration: line-through;
    color: #a8b1c7;
    font-size: 0.95rem;
}

.precio-oferta {
    color: #39ff14;
    font-weight: bold;
    font-size: 1.15rem;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

/* BOTON AGREGAR */
.btn-agregar {
    width: 100%;
    margin-top: 10px;
    padding: 11px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #39ff14, #0fe36f);
    color: #051008;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-agregar:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* PANEL CARRITO */
.panel-carrito {
    position: fixed;
    top: 0;
    right: 0;
    width: 390px;
    max-width: 95%;
    height: 100vh;
    background: linear-gradient(180deg, #0d1424, #08101d);
    border-left: 2px solid #39ff14;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.45);
    padding: 22px 18px;
    z-index: 999;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #223457;
}

.panel-header h2 {
    margin: 0;
    padding-left: 12px;
    font-size: 1.1rem;
    flex: 1;
}

.btn-cerrar {
    border: none;
    background: #ff4d6d;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-cerrar:hover {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.vacio {
    color: #b5c1dc;
    font-size: 0.98rem;
}

.item-carrito {
    background: rgba(17, 25, 45, 0.9);
    border: 1px solid #223457;
    border-radius: 14px;
    padding: 14px 12px;
    margin-bottom: 14px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.06);
}

.item-carrito h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.item-carrito p {
    color: #d2dbef;
    margin-bottom: 6px;
    font-size: 0.96rem;
}

.controles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.controles button {
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    background: #00e5ff;
    color: #031018;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.controles button:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.controles .eliminar {
    background: #ff4d6d;
    color: white;
}

.totales {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 2px solid #39ff14;
}

.totales h3 {
    color: #ffffff;
    font-size: 1.6rem;
}

.btn-guardar {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #39ff14, #0fe36f);
    color: #051008;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-guardar:hover {
    transform: scale(1.02);
    filter: brightness(1.08);
}

.json-link {
    margin-top: 15px;
    text-align: center;
}

.json-link a {
    color: #00e5ff;
    text-decoration: none;
    font-weight: bold;
}

.json-link a:hover {
    text-decoration: underline;
}

/* OCULTO */
.oculto {
    display: none !important;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    padding: 20px;
}

.modal-contenido {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #11192d, #0b1220);
    border: 2px solid #39ff14;
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.2);
}

.modal-contenido h3 {
    color: #ffffff;
    font-size: 1.7rem;
    margin-bottom: 10px;
}

.modal-contenido p {
    color: #d2dbef;
    margin-bottom: 20px;
}

/* BOTONES MODAL */
.btn-cerrar-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d6d;
    color: white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.cantidad-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.btn-cantidad {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: none;
    background: #00e5ff;
    color: #031018;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-cantidad:hover {
    transform: scale(1.1);
}

#input-cantidad {
    width: 80px;
    height: 45px;
    text-align: center;
    border: 1px solid #223457;
    border-radius: 10px;
    background: #0a0f1d;
    color: #ffffff;
    font-size: 1.1rem;
    outline: none;
}

.btn-confirmar-modal {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #39ff14, #0fe36f);
    color: #051008;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-confirmar-modal:hover {
    transform: scale(1.03);
    filter: brightness(1.08);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .grid-productos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-contenido h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .grid-productos {
        grid-template-columns: 1fr;
    }

    .btn-carrito-flotante {
        position: static;
        margin-top: 20px;
    }

    .hero {
        flex-direction: column;
    }

    .panel-carrito {
        width: 100%;
        max-width: 100%;
    }
}