/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* BODY */
body {
    background: #f5f5f5;
    color: #333;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    background: #d94d92;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    z-index: 100;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.logo span {
    font-size: 16px;
    font-weight: bold;
}

/* CARRITO ICONO */
.carrito-icono {
    font-size: 18px;
    cursor: pointer;
}

.carrito-icono span {
    background: #fff;
    color: #d94d92;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 12px;
}

/* ===== CATEGORÍAS ===== */
.categorias {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: #fff;
    position: sticky;
    top: 55px;
    z-index: 99;
}

/* BOTÓN CATEGORÍA */
.categoria-btn {
    padding: 6px 12px;
    border-radius: 20px;
    background: #eee;
    white-space: nowrap;
    font-size: 13px;
    cursor: pointer;
}

.categoria-btn.activo {
    background: #d94d92;
    color: #fff;
}

/* ===== PRODUCTOS ===== */
.productos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}

/* CARD */
.producto {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.producto:active {
    transform: scale(0.97);
}

/* IMAGEN COMPLETA */
.producto img {
    width: 100%;
    height: 160px;
    object-fit: contain;
}

/* TITULO */
.producto h3 {
    font-size: 14px;
    margin: 5px 0;
}

/* PRECIO */
.producto .precio {
    font-size: 15px;
    font-weight: bold;
    color: #d94d92;
}

/* BOTÓN */
.producto button {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: #d94d92;
    color: #fff;
    font-size: 13px;
}


/* ITEM CARRITO */
.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* TEXTO ITEM */
.item-carrito div {
    font-size: 13px;
}

/* CONTROLES */
.cantidad {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cantidad button {
    padding: 4px 8px;
    border: none;
    background: #eee;
    border-radius: 5px;
}

/* ELIMINAR */
.item-carrito button {
    border: none;
    background: none;
    font-size: 16px;
}

/* BOTÓN FINAL */
.btn-comprar {
    width: 100%;
    padding: 15px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    margin-top: 10px;
}

/* ===== CHECKOUT ===== */
/* ===== CHECKOUT (MODAL PRO) ===== */
.checkout {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px;
    border-radius: 20px 20px 0 0;
    max-height: 80%;
    overflow-y: auto;

    transform: translateY(100%);
    transition: transform 0.3s ease;

    z-index: 110;
}

/* ACTIVO */
.checkout.active {
    transform: translateY(0);
}
.input {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* ===== BOTÓN WHATSAPP ===== */
.whatsapp {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: #25D366;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
    .productos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .productos {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ANIMACIÓN GENERAL */
* {
    -webkit-tap-highlight-color: transparent;
}

#carrito-panel,
.checkout {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    max-height: 80%;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;

    transform: translateY(100%);
    transition: transform 0.3s ease;

    z-index: 100;
}

/* CHECKOUT ENCIMA */
.checkout {
    z-index: 110;
}

/* ACTIVO */
#carrito-panel.active,
.checkout.active {
    transform: translateY(0);
}

/* FONDO OSCURO */
/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 90;
}

/* ACTIVO */
.overlay.active {
    display: block;
}

/* CARRITO Y CHECKOUT COMO MODAL */
#carrito-panel,
.checkout {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    max-height: 80%;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: 0.3s ease;
    z-index: 100;
}

/* ACTIVO */
#carrito-panel.active,
.checkout.active {
    transform: translateY(0);
}

/* CHECKOUT ENCIMA DEL CARRITO */
.checkout {
    z-index: 110;
}

/* EFECTO BOTÓN */
button {
    transition: 0.2s;
}

button:active {
    transform: scale(0.95);
}

/* EFECTO PRODUCTO */
.producto {
    transition: transform 0.2s, box-shadow 0.2s;
}

.producto:active {
    transform: scale(0.97);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


/* ===== MODAL APP STORE ===== */
#install-modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.6);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 99999;
}

/* CAJA */
.install-box{
    background: #fff;
    width: 85%;
    max-width: 320px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;

    animation: pop 0.3s ease;
}

.install-box h2{
    font-size: 18px;
    margin-bottom: 10px;
}

.install-box p{
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

#install-banner{
    position: fixed;
    bottom: 80px;
    left: 10px;
    right: 10px;

    background: #d94d92;
    color: #fff;

    padding: 12px 15px;
    border-radius: 12px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 13px;

    box-shadow: 0 5px 15px rgba(0,0,0,0.2);

    z-index: 99999;
}

#install-banner button{
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

#btnInstall{
    background: #fff;
    color: #d94d92;
    font-weight: bold;
}