/* ===========================
   styles.css (UX mejorado)
   Mantiene colores originales
   =========================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #333;
}

/* Header fijo */
header {
    background: #b30000;
    color: #fff;
    padding: 15px 10px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 26px;
}

nav {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

nav a:hover {
    background: rgba(255,255,255,0.15);
}

/* Layout */
.main-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    align-items: flex-start;
}

/* Sidebar con acordeón */
.sidebar {
    width: 250px;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.menu-section strong {
    display: block;
    cursor: pointer;
    margin-bottom: 8px;
    color: #b30000;
    font-size: 1.05em;
    user-select: none;
}

.sidebar ul {
    list-style: none;
    margin: 0 0 12px;
    padding: 0 0 0 10px;
    display: none;
    transition: all 0.3s ease;
}

.sidebar li { margin-bottom: 6px; }

.sidebar a {
    display: block;
    padding: 6px 10px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar a:hover { background: #e9e9e9; }
.sidebar a.active { background: #b30000; color: #fff; font-weight: bold; }

/* Contenido principal */
.content {
    flex: 1;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Buscador */
.search-box {
    margin-bottom: 20px;
    position: relative;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
}

.search-box::after {
    content: "🔍";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

/* Filtros activos (chips) */
.active-filters {
    margin: 15px 0;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.active-filters li {
    background: #e0f0ff;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Productos en cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #c8c8c8;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.13);
    border-color: #a0a0a0;
}

.product-card img {
    width: 100%;
    height: 220px;          /* altura uniforme */
    object-fit: cover;      /* recorte proporcional sin deformar */
    object-position: center;
    border-radius: 6px;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 1.1em;
    margin-bottom: 6px;
    color: #b30000;
}

.product-card p {
    font-size: 0.95em;
    margin-bottom: 8px;
}

.product-card .price {
    font-weight: bold;
    margin-bottom: 10px;
}

.product-card a.btn-whatsapp {
    background: #25D366;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s;
}

.product-card a.btn-whatsapp:hover {
    background: #1ebe5a;
}

/* Footer */
.footer {
    background: #000;
    color: #fff;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
}

.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 992px) {
    .main-container { flex-direction: column; }
    .sidebar { width: 100%; }
}

.btn-vermas {
    background: #b30000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 0.95em;
    margin-top: 8px;
    display: block;
    transition: background 0.2s;
}

.btn-vermas:hover {
    background: #8e0000;
}

/* Smartphones: mostrar 2 columnas */
@media (max-width: 600px) {

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card img {
        height: 150px;
    }

}