/* =========================
   CONFIGURACIÓN GENERAL
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins', sans-serif;
}

body{
    background:#f4f6f9;
    color:#333;
}

/* =========================
   HEADER
========================= */

.header{
    background:#111827;
    color:white;
    position:sticky;
    top:0;
    z-index:1000;
}

.navbar{
    max-width:1400px;
    margin:auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 40px;
}

.logo{
    display:flex;
    align-items:center;
    gap:10px;
}

.logo h1{
    color:#00bfff;
}

.logo-icon{
    font-size:1.8rem;
}

.nav-links{
    list-style:none;
    display:flex;
    gap:25px;
}

.nav-links a{
    text-decoration:none;
    color:white;
    transition:.3s;
}

.nav-links a:hover{
    color:#00bfff;
}

.cart-button{
    background:#00bfff;
    color:white;
    border:none;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
    font-weight:600;
}

.cart-button:hover{
    background:#0099cc;
}

/* =========================
   HERO
========================= */

.hero{
    min-height:80vh;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:80px;
    background:linear-gradient(
        135deg,
        #111827,
        #1f2937
    );
    color:white;
}

.hero-content{
    width:55%;
}

.etiqueta{
    background:#00bfff;
    padding:8px 15px;
    border-radius:20px;
}

.hero h2{
    font-size:3rem;
    margin:20px 0;
}

.hero p{
    line-height:1.8;
    margin-bottom:25px;
}

.hero-buttons{
    display:flex;
    gap:15px;
}

.btn-primary,
.btn-secondary{
    padding:12px 25px;
    text-decoration:none;
    border-radius:10px;
    font-weight:600;
}

.btn-primary{
    background:#00bfff;
    color:white;
}

.btn-secondary{
    border:2px solid white;
    color:white;
}

.hero-card{
    background:white;
    color:#333;
    padding:25px;
    border-radius:15px;
    width:320px;
    box-shadow:0 10px 30px rgba(0,0,0,.2);
}

/* =========================
   BUSCADOR
========================= */

.search-section{
    text-align:center;
    padding:50px 20px;
}

.search-box{
    margin-top:20px;
    display:flex;
    justify-content:center;
    gap:10px;
}

.search-box input{
    width:500px;
    padding:12px;
    border:1px solid #ccc;
    border-radius:8px;
}

.search-box button{
    background:#00bfff;
    color:white;
    border:none;
    padding:12px 25px;
    border-radius:8px;
    cursor:pointer;
}

/* =========================
   CATEGORÍAS
========================= */

.categorias{
    text-align:center;
    padding:60px 20px;
}

.categoria-container{
    margin-top:30px;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
}

.categoria-btn{
    padding:12px 20px;
    border:none;
    background:white;
    border-radius:8px;
    cursor:pointer;
    box-shadow:0 3px 8px rgba(0,0,0,.1);
    transition:.3s;
}

.categoria-btn:hover{
    background:#00bfff;
    color:white;
}

/* =========================
   PRODUCTOS
========================= */

.productos{
    padding:60px 40px;
}

.section-title{
    text-align:center;
    margin-bottom:40px;
}

.productos-grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap:25px;
    justify-content:center;
}

.producto-card{
    max-width:320px;
    width:100%;
}

.producto-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    object-position:center;
}

.producto-card{
    background:white;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 5px 20px rgba(0,0,0,.1);
    transition:.3s;
}

.producto-card:hover{
    transform:translateY(-5px);
}

.producto-card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.producto-info{
    padding:20px;
}

.producto-info h3{
    margin-bottom:10px;
}

.precio{
    color:#00bfff;
    font-size:1.3rem;
    font-weight:bold;
    margin:10px 0;
}

.btn-agregar{
    width:100%;
    padding:12px;
    border:none;
    background:#00bfff;
    color:white;
    border-radius:8px;
    cursor:pointer;
}

.btn-agregar:hover{
    background:#0099cc;
}

/* =========================
   CARRITO
========================= */

.carrito{
    position:fixed;
    right:0;
    top:0;
    width:350px;
    height:100vh;
    background:white;
    box-shadow:-5px 0 20px rgba(0,0,0,.1);
    padding:20px;
    overflow-y:auto;

    transform:translateX(100%);
    transition:.4s;
}

.carrito.activo{
    transform:translateX(0);
}

.carrito-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.carrito-items{
    margin-bottom:20px;
}

.resumen{
    border-top:1px solid #ddd;
    padding-top:20px;
}

.resumen p{
    margin:10px 0;
}

.total{
    font-size:1.3rem;
    font-weight:bold;
}

.acciones-carrito{
    margin-top:20px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.btn-danger{
    background:#ef4444;
    color:white;
    border:none;
    padding:12px;
    border-radius:8px;
    cursor:pointer;
}

.btn-success{
    background:#22c55e;
    color:white;
    border:none;
    padding:12px;
    border-radius:8px;
    cursor:pointer;
}

/* =========================
   BENEFICIOS
========================= */

.beneficios{
    padding:80px 40px;
    text-align:center;
}

.beneficios-grid{
    margin-top:40px;
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(250px,1fr));
    gap:25px;
}

.beneficios-grid article{
    background:white;
    padding:30px;
    border-radius:15px;
    box-shadow:0 5px 20px rgba(0,0,0,.1);
}

.beneficios-grid span{
    font-size:3rem;
}

/* =========================
   FOOTER
========================= */

.footer{
    background:#111827;
    color:white;
    padding:40px;
    display:flex;
    justify-content:space-around;
    flex-wrap:wrap;
    gap:30px;
}

.footer h3,
.footer h4{
    margin-bottom:10px;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

    .hero{
        flex-direction:column;
        text-align:center;
        gap:30px;
        padding:50px 20px;
    }

    .hero-content{
        width:100%;
    }

    .hero h2{
        font-size:2rem;
    }

    .navbar{
        flex-direction:column;
        gap:15px;
    }

    .nav-links{
        flex-wrap:wrap;
        justify-content:center;
    }

    .search-box{
        flex-direction:column;
        align-items:center;
    }

    .search-box input{
        width:90%;
    }

    .carrito{
        width:100%;
    }
    .hero-image{
        width:100%;
    }

    .hero-image img{
        max-width:350px;
    }
}
/* PRODUCTO EXTRA */
.categoria-producto {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: .8rem;
    margin-bottom: 10px;
}

.sin-resultados {
    text-align: center;
    font-size: 1.2rem;
    grid-column: 1 / -1;
    color: #666;
}

/* CARRITO MEJORADO */
.item-carrito {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}

.item-carrito h4 {
    font-size: .9rem;
    margin-bottom: 5px;
}

.controles-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.controles-item button {
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-aumentar {
    background: #22c55e;
    color: white;
}

.btn-disminuir {
    background: #f59e0b;
    color: white;
}

.btn-eliminar {
    background: #ef4444;
    color: white;
}

/* NOTIFICACIÓN MODERNA */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111827;
    color: white;
    padding: 14px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    opacity: 0;
    transition: .4s;
    z-index: 3000;
}

.toast.activo {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* MODAL COMPRA */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.modal.activo {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 420px;
    padding: 30px;
    border-radius: 18px;
    text-align: center;
    animation: aparecer .3s ease;
}

.modal-content h2 {
    color: #22c55e;
    margin-bottom: 10px;
}

.modal-content button {
    margin-top: 20px;
    background: #00bfff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
}

@keyframes aparecer {
    from {
        transform: scale(.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
/* BOTÓN DE CATEGORÍA ACTIVA */
.categoria-btn.activo {
    background: #00bfff;
    color: white;
    transform: translateY(-2px);
}

/* HEADER AL HACER SCROLL */
.header-scroll {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 5px 20px rgba(0,0,0,.25);
}

/* CARRITO SOBRE TODO */
.carrito {
    z-index: 2500;
}

/* CARRITO VACÍO */
.carrito-vacio {
    background: #f1f5f9;
    color: #64748b;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
}

/* MEJOR ORDEN DE ITEM DEL CARRITO */
.item-carrito {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* BOTONES MÁS MODERNOS DEL CARRITO */
.controles-item button {
    transition: .3s;
}

.controles-item button:hover {
    transform: scale(1.12);
    opacity: .85;
}

/* BOTÓN FINALIZAR MÁS MODERNO */
.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    font-weight: 600;
}

.btn-success:hover {
    transform: translateY(-2px);
}

/* BOTÓN VACIAR MÁS MODERNO */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    font-weight: 600;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

/* BOTÓN CERRAR CARRITO */
#cerrar-carrito {
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

#cerrar-carrito:hover {
    background: #ef4444;
    color: white;
}

/* PRODUCTOS MÁS PROFESIONALES */
.producto-card {
    border: 1px solid #e5e7eb;
}

.producto-info p {
    color: #64748b;
    font-size: .9rem;
}

/* BOTÓN AGREGAR MÁS MODERNO */
.btn-agregar {
    font-weight: 600;
    transition: .3s;
}

.btn-agregar:hover {
    transform: translateY(-2px);
}

.btn-detalle {
    width: 100%;
    padding: 12px;
    border: 1px solid #00bfff;
    background: white;
    color: #00bfff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
    transition: .3s;
}

.btn-detalle:hover {
    background: #e0f2fe;
}

.detalle-modal {
    max-width: 900px;
    text-align: left;
    position: relative;
}

.detalle-producto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.detalle-imagen img {
    width: 100%;
    border-radius: 15px;
}

.detalle-info h2 {
    margin: 15px 0;
    color: #111827;
}

.detalle-info h3 {
    margin: 20px 0 10px;
}

.detalle-info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.detalle-info li {
    margin-bottom: 8px;
    color: #475569;
}

.btn-agregar-detalle {
    width: 100%;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, #00bfff, #0284c7);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.cerrar-detalle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

@media(max-width:768px) {
    .detalle-producto {
        grid-template-columns: 1fr;
    }
}

.hero-image{
    width:40%;
    display:flex;
    justify-content:center;
    align-items:center;
}

.hero-image img{
    width:100%;
    max-width:550px;
    border-radius:25px;
    box-shadow:0 25px 50px rgba(0,0,0,.35);
    animation: flotar 4s ease-in-out infinite;
    transition:.4s;
}

.hero-image img:hover{
    transform:scale(1.03);
}

@keyframes flotar{
    0%{
        transform:translateY(0px);
    }

    50%{
        transform:translateY(-18px);
    }

    100%{
        transform:translateY(0px);
    }
}

.stock{
    color:#16a34a;
    font-weight:600;
    margin-bottom:10px;
    font-size:.9rem;
}

@media(max-width:768px){

    .navbar{
        padding: 18px 20px;
    }

    .nav-links{
        background: rgba(255,255,255,.08);
        padding: 12px 18px;
        border-radius: 30px;
        gap: 18px;
        row-gap: 10px;
    }

    .cart-button{
        margin-top: 5px;
    }

    .hero{
        padding-top: 70px;
        min-height: auto;
    }

    .hero h2{
        font-size: 2.4rem;
        line-height: 1.2;
        margin-top: 25px;
    }

    .hero p{
        font-size: 1rem;
    }

    .hero-buttons{
        justify-content: center;
    }

    .hero-image{
        margin-top: 20px;
    }

    .hero-image img{
        max-width: 220px;
        border-radius: 22px;
    }
}
.logo{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo-img{
    width:58px;
    height:58px;
    object-fit:contain;
}

.logo-text{
    display:flex;
    flex-direction:column;
    line-height:1.1;
}

.logo-text h1{
    color:#00bfff;
    font-size:2rem;
    margin:0;
}

.logo-text span{
    color:#bfc7d5;
    font-size:.85rem;
}
/* FORMULARIO DE PAGO */
.pago-modal {
    text-align: left;
}

.pago-modal h2,
.pago-modal p {
    text-align: center;
}

.form-pago {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-pago label {
    font-weight: 600;
    color: #111827;
}

.form-pago input,
.form-pago select {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    outline: none;
}

.form-pago input:focus,
.form-pago select:focus {
    border-color: #00bfff;
    box-shadow: 0 0 0 3px rgba(0,191,255,.2);
}

.fila-pago {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.oculto {
    display: none;
}

.form-pago button {
    background: #00bfff;
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancelar {
    background: #ef4444 !important;
}