/* assets/css/tienda.css */

/* Toolbar */
.tienda-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #888;
}

.search-box input {
    width: 100%;
    background: #1c1c24;
    border: 1px solid #2a2a36;
    color: #fff;
    padding: 10px 10px 10px 35px;
    border-radius: 8px;
    outline: none;
}

.select-filtro-tienda {
    background: #1c1c24;
    border: 1px solid #2a2a36;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    outline: none;
}

.btn-carrito {
    position: relative;
    background: #00bcd4;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

.carrito-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Grilla de productos */
.grid-productos {
    display: grid;
    /* En PC muestra varios, en celu adapta */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.producto-card {
    background: #1c1c24;
    border: 1px solid #2a2a36;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s;
}

.producto-card.agotado {
    opacity: 0.6;
    filter: grayscale(100%);
}

.badge-estado {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4d4d;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.img-container {
    height: 140px;
    background: #12121a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.producto-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.marca-badge {
    font-size: 10px;
    color: #9b6dff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.producto-titulo {
    color: #fff;
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.precios-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 15px;
}

.precio-plata {
    color: #00e676;
    font-weight: bold;
    font-size: 15px;
}

.precio-puntos {
    color: #ff9800;
    font-weight: bold;
    font-size: 13px;
}

.btn-detalles-tienda {
    background: transparent;
    border: 1px solid #00bcd4;
    color: #00bcd4;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-detalles-tienda:hover {
    background: #00bcd4;
    color: #12121a;
}

/* Estilos del Modal */
.modal-content-tienda {
    background: #1c1c24;
    width: 100%;
    max-width: 450px;
    border-radius: 20px; /* Bordes redondeados arriba (estilo app) */
    padding: 25px;
    position: relative;
    border-top: 1px solid #3a3a4a;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.btn-cerrar-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}
/* --- ESTILOS DEL CARRITO LATERAL (DRAWER) --- */
/* --- ESTILOS DEL CARRITO LATERAL (DRAWER) CORREGIDOS --- */
.drawer-overlay {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-carrito {
    position: fixed; /* Anclado a la pantalla, no al overlay */
    top: 0; 
    right: -100%; /* Escondido totalmente afuera */
    width: 100%; 
    max-width: 400px; 
    height: 100vh; /* Alto exacto de la pantalla */
    background: #1c1c24;
    border-left: 2px solid #9b6dff;
    display: flex; 
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.8);
    box-sizing: border-box; /* FUNDAMENTAL: Evita que el padding rompa la pantalla */
}

/* El Header fijo arriba */
.drawer-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px;
    border-bottom: 1px solid #3a3a4a;
}

.btn-cerrar-drawer {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-cerrar-drawer:hover {
    background: #ff4d4d;
}

/* El Body con scroll automático si hay muchos productos */
.drawer-body {
    flex: 1; /* Ocupa todo el espacio sobrante */
    overflow-y: auto; 
    padding: 20px;
}

/* El Footer fijo abajo */
.drawer-footer {
    padding: 20px;
    border-top: 1px solid #3a3a4a;
    background: #12121a;
}