:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --text: #0f172a;
    --success: #16a34a;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* Cabecera pegajosa */
.header-wrapper {
    position: sticky;
    top: 0;
    background: var(--bg);
    padding: 20px;
    z-index: 100;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

/* Contenedor flexible: Input + Select */
.search-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Espacio entre input y select */
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap; /* Para que baje en celulares muy chicos */
}

#search {
    flex: 1; /* Ocupa todo el espacio posible */
    min-width: 200px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    outline: none;
}

#filter-type {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    color: #475569;
    font-weight: 600;
}

#search:focus, #filter-type:focus {
    border-color: var(--primary);
}

#counter {
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    background-color: #e2e8f0;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
}

/* Grilla */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1300px;
    margin: 20px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

.img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.product-img { max-width: 100%; max-height: 100%; object-fit: contain; }

.category { font-size: 10px; font-weight: 800; color: var(--primary); text-transform: uppercase; }
.brand { font-size: 11px; color: #94a3b8; font-weight: 600; margin-bottom: 5px; }
.name { font-size: 14px; font-weight: 600; margin: 5px 0; height: 3em; overflow: hidden; line-height: 1.3; }
.price { font-size: 1.4rem; font-weight: 800; color: var(--success); margin-top: auto; }
.id-tag { font-size: 10px; color: #cbd5e1; text-align: right; margin-top: 5px; }

/* --- Estilos para la barra superior (Logo y Redes) --- */

.nav-row {
    display: flex;
    justify-content: space-between; /* Empuja el logo a la izq y redes a la der */
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Ancho máximo para que no se separen demasiado en pantallas gigantes */
    margin: 0 auto 20px auto; /* Centrado y margen abajo para separar del buscador */
    padding: 0 10px;
    box-sizing: border-box;
}

/* Estilo del Logo Principal */
.main-logo {
    height: 60px; /* Ajusta este valor según el tamaño deseado */
    width: auto;  /* Mantiene la proporción */
    display: block;
}

/* Contenedor de iconos sociales */
.social-buttons {
    display: flex;
    gap: 15px; /* Espacio entre iconos */
}

/* Estilo de cada icono de red social */
.social-icon {
    width: 35px;  /* Tamaño del botón */
    height: 35px;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: pointer;
}

/* Efecto hover en las redes */
.social-icon:hover {
    transform: scale(1.15); /* Se agranda un poquito al pasar el mouse */
}

/* Ajuste Responsivo para celulares muy chicos */
@media (max-width: 480px) {
    .nav-row {
        flex-direction: column; /* Pone uno debajo del otro en celus viejos */
        gap: 15px;
    }
}