:root {
    --primary: #008069;
    --secondary: #DA0081;
    --bg: #f0f2f5;
    --white: #ffffff;
    --text-main: #111b21;
    --text-muted: #667781;
    --max-width-pc: 1400px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0; background-color: var(--bg); color: var(--text-main);
    display: flex; flex-direction: column; align-items: center;
}

/* Header & Search */
.main-header { width: 100%; background: var(--white); display: flex; justify-content: center; border-bottom: 1px solid #e9edef; z-index: 1000; }
.header-content { width: 100%; max-width: var(--max-width-pc); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo-text { font-weight: 900; font-size: 1.2rem; color: var(--primary); line-height: 1.1; }
.user-icon { font-size: 28px; cursor: pointer; transition: 0.3s; }
.user-icon:hover { transform: scale(1.2); }

.search-section { width: 100%; background: var(--white); display: flex; justify-content: center; padding: 15px 0; position: sticky; top: 0; z-index: 900; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.search-wrapper { width: 90%; max-width: 600px; }
.search-input { width: 100%; padding: 14px 25px; border-radius: 30px; border: 1px solid #d1d7db; background: #f0f2f5; outline: none; font-size: 16px; transition: var(--transition); }
.search-input:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 128, 105, 0.1); }

/* Contenedor */
.container { width: 100%; max-width: var(--max-width-pc); padding: 20px; display: flex; flex-direction: column; }

/* Banners */
.banner-slider { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 10px; scrollbar-width: none; }
.banner-slider::-webkit-scrollbar { display: none; }
.banner-card { min-width: 280px; flex: 1; height: 160px; border-radius: 20px; background: linear-gradient(135deg, var(--primary), #00a884); color: white; padding: 25px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Categorías Centradas */
.section-title { font-size: 1.1rem; font-weight: 700; margin: 25px 0 15px 0; }
.categories-section { width: 100%; display: flex; justify-content: center; padding: 10px 0; }
.categories-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; width: 100%; max-width: 800px; }
.cat-item { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; transition: var(--transition); }
.cat-circle { width: 60px; height: 60px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 8px; border: 2px solid transparent; box-shadow: 0 3px 6px rgba(0,0,0,0.05); transition: var(--transition); }
.cat-item:hover .cat-circle { transform: translateY(-5px) scale(1.1); border-color: var(--primary); box-shadow: 0 5px 15px rgba(0, 128, 105, 0.2); }
.cat-label { font-size: 12px; font-weight: 600; }

/* Grid de Productos Corregido */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; justify-content: center; }
.product-card { background: var(--white); border-radius: 16px; padding: 10px; border: 2px solid transparent; transition: var(--transition); display: flex; flex-direction: column; cursor: pointer; }
.product-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.product-img { width: 100%; aspect-ratio: 1/1; border-radius: 10px; object-fit: cover; margin-bottom: 8px; }
.product-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; height: 32px; overflow: hidden; }
.product-price { color: var(--primary); font-weight: 800; font-size: 1rem; margin-bottom: 8px; }
.btn-add { width: 100%; background: var(--primary); color: white; border: none; padding: 8px; border-radius: 8px; font-weight: 700; cursor: pointer; }

/* Media Queries PC */
@media (min-width: 1024px) {
    .categories-container { grid-template-columns: repeat(8, 1fr); gap: 25px; }
    .products-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; }
    .cat-circle { width: 70px; height: 70px; font-size: 30px; }
}

/* Carrito Dinámico */
.cart-footer { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%) translateY(150%); z-index: 1000; transition: var(--transition); opacity: 0; visibility: hidden; }
.cart-footer.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.btn-cart { background: var(--secondary); color: white; border: none; padding: 16px 35px; border-radius: 50px; font-weight: 800; font-size: 16px; box-shadow: 0 8px 25px rgba(218, 0, 129, 0.4); cursor: pointer; transition: 0.3s; }
.btn-cart:hover { transform: scale(1.05); }