/* VARIABLES DE COLOR MODERNAS */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --header-height: 65px;
}

/* RESETEO Y CONFIGURACIÓN NATIVA */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Quita el molesto parpadeo azul al tocar botones en Android/iOS */
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-top: var(--header-height); /* Da espacio para que el header no tape el contenido */
    padding-bottom: 40px;
}

/* =========================================
   HEADER (BARRA SUPERIOR FIJA)
   ========================================= */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* Efecto cristal de iPhone */
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.btn-icon {
    background: var(--primary);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 12px; /* Cuadro con bordes redondeados (Estilo iOS) */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
    transition: transform 0.2s;
}

.btn-icon:active {
    transform: scale(0.90); /* Efecto de hundimiento al tocar */
}

/* =========================================
   CONTENEDOR Y TÍTULOS
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.badge {
    background: var(--border-light);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* =========================================
   TARJETAS DE PRODUCTOS (DISEÑO MÓVIL POR DEFECTO)
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas tipo Instagram/Shein */
    gap: 16px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-image-placeholder {
    background: #f1f5f9;
    aspect-ratio: 1 / 1; /* Cuadrado perfecto */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 3rem;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
    /* Corta el texto largo con puntos suspensivos... */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

/* =========================================
   PANTALLA VACÍA Y BOTONES
   ========================================= */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 5rem;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.btn {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

/* =========================================
   ADAPTACIÓN PARA PC (PANTALLAS GRANDES)
   ========================================= */
@media (min-width: 768px) {
    .product-grid {
        /* Se adapta automáticamente para mostrar 4 o 5 columnas en PC */
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
        gap: 24px;
    }
    
    .header-content {
        padding: 0 40px;
    }
    
    .container {
        padding: 40px;
    }
    
    .product-card:hover {
        transform: translateY(-5px); /* Efecto de levitar al pasar el mouse en PC */
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }
    
    .btn-icon:hover {
        background: var(--primary-dark);
        transform: scale(1.05);
    }
}