:root {
    --primary: #008069;
    --secondary: #DA0081;
    --bg: #f8f9fa;
    --white: #ffffff;
    --text-main: #111b21;
    --text-muted: #667781;
}

* { 
    box-sizing: border-box; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    margin: 0; 
    background-color: var(--bg); 
    color: var(--text-main); 
}

/* CABECERA (HEADER) */
.top-bar {
    background: var(--primary); color: var(--white); padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.menu-btn { font-size: 24px; cursor: pointer; background: none; border: none; color: white; padding: 0; }
.logo-title { font-weight: 900; font-size: 1.2rem; margin: 0; text-align: center; flex: 1; }
.logo-title span { color: #dcf8c6; }
.cart-btn { position: relative; font-size: 22px; cursor: pointer; background: none; border: none; color: white; padding: 0; }
.cart-badge {
    position: absolute; top: -5px; right: -8px; background: var(--secondary); color: white;
    font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 10px; transition: transform 0.2s;
}

/* MENÚ LATERAL (HAMBURGUESA) */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 999; display: none; opacity: 0; transition: opacity 0.3s;
}
.sidebar {
    position: fixed; top: 0; left: -280px; width: 260px; height: 100%;
    background: var(--white); z-index: 1000; transition: left 0.3s ease;
    box-shadow: 2px 0 15px rgba(0,0,0,0.2); display: flex; flex-direction: column;
}
.sidebar.open { left: 0; }

.sidebar-header { background: var(--primary); color: white; padding: 20px; text-align: center; }
.sidebar-header h2 { margin: 0; font-size: 1.2rem; }

.sidebar-menu { list-style: none; padding: 0; margin: 0; flex: 1; overflow-y: auto; }
.sidebar-menu li { border-bottom: 1px solid #eee; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 15px; padding: 15px 20px;
    color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 15px;
}
.sidebar-menu a:hover { background: #f0f2f5; color: var(--primary); }
.sidebar-menu i { font-size: 20px; width: 25px; text-align: center; }

/* CONTENIDO PRINCIPAL */
.container { padding: 15px; max-width: 800px; margin: 0 auto; }

/* BUSCADOR */
.search-container { margin-bottom: 20px; }
.search-bar {
    width: 100%; padding: 12px 15px; border-radius: 25px; border: 1px solid #ddd;
    font-size: 14px; outline: none; background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.search-bar:focus { border-color: var(--primary); }

/* CATEGORÍAS HORIZONTALES */
.categories-wrapper { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.categories-wrapper::-webkit-scrollbar { display: none; }
.cat-chip {
    background: var(--white); padding: 8px 15px; border-radius: 20px; font-size: 13px;
    font-weight: bold; color: var(--text-muted); white-space: nowrap; border: 1px solid #ddd; cursor: pointer;
}
.cat-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* GRID DE PRODUCTOS */
.section-title { font-weight: 800; font-size: 1.1rem; margin: 20px 0 15px; display: block; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

.product-card {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative;
    display: flex; flex-direction: column;
}
.product-img { width: 100%; height: 120px; object-fit: cover; background: #eee; }
.product-info { padding: 10px; flex: 1; }
.store-name { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-title { font-size: 13px; font-weight: bold; margin: 5px 0; line-height: 1.2; }
.product-price { color: var(--primary); font-weight: 900; font-size: 14px; }

.btn-add {
    position: absolute; bottom: 10px; right: 10px; background: var(--secondary);
    color: white; border: none; width: 30px; height: 30px; border-radius: 50%;
    font-size: 18px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center;
}