/* ========================================
   ESTILOS - PAGINA MERCADITO
   ======================================== */

/* Search bar location dropdown (completo - mismo que servicios/eventos) */
.page-header-search-input--location { position: relative; }
.page-header-search-input--location input { cursor: pointer; padding-right: 1rem; }
.page-header-search-input--text input { padding-right: 2.75rem; }
.services-search-clear { display: none; }
.services-search-clear[hidden] { display: none; }
.services-search-clear {
    position: absolute; top: 50%; right: 0.75rem; transform: translateY(-50%);
    width: 1.9rem; height: 1.9rem; border: none; background: var(--gray-100);
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--gray-500); transition: background 0.15s;
}
.services-search-clear:hover { background: var(--gray-200); }

.page-header-search-btn { background-color: #e17201 !important; }
.page-header-search-btn:hover { background-color: #c85a00 !important; }

.location-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: white; border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); border: 1px solid var(--gray-200);
    z-index: 100; max-height: 340px; overflow-y: auto; overscroll-behavior: contain;
}
.location-dropdown__option {
    display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem 1rem;
    cursor: pointer; font-size: 0.875rem; color: var(--gray-700); transition: background-color 0.15s;
}
.location-dropdown__option:hover { background-color: var(--gray-50); }
.location-dropdown__option--geo { color: var(--primary-600); font-weight: 500; }
.location-dropdown__option--geo:hover { background-color: var(--primary-50); }
.location-dropdown__option--all { color: var(--gray-500); }
.location-dropdown__icon { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.location-dropdown__icon-ri { font-size: 1.125rem; flex-shrink: 0; width: 1.125rem; text-align: center; }
.location-dropdown__loading { width: 1rem; height: 1rem; margin-left: auto; animation: spin 1s linear infinite; }
.location-dropdown__divider { height: 1px; background: var(--gray-200); margin: 0; }
.location-dropdown__list { padding: 0.25rem 0; max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.location-dropdown__loading-text { padding: 0.75rem 1rem; font-size: 0.8125rem; color: var(--gray-400); text-align: center; }
.location-dropdown__estado-header {
    display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 1rem;
    cursor: pointer; font-size: 0.875rem; color: var(--gray-700); transition: background-color 0.15s;
}
.location-dropdown__estado-header:hover { background-color: var(--gray-50); }
.location-dropdown__estado-name { flex: 1; font-weight: 500; }
.location-dropdown__estado-count {
    font-size: 0.75rem; color: var(--gray-400); background: var(--gray-100);
    padding: 0.125rem 0.5rem; border-radius: var(--radius-full);
}
.location-dropdown__chevron { font-size: 1.125rem; color: var(--gray-400); transition: transform 0.2s; }
.location-dropdown__estado--expanded .location-dropdown__chevron { transform: rotate(90deg); color: var(--primary-500); }
.location-dropdown__estado--expanded > .location-dropdown__estado-header { background-color: var(--primary-50); color: var(--primary-700); }
.location-dropdown__ciudades { border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.location-dropdown__ciudad {
    display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 1rem 0.5rem 2.5rem;
    cursor: pointer; font-size: 0.8125rem; color: var(--gray-600); transition: background-color 0.15s;
}
.location-dropdown__ciudad:hover { background-color: var(--primary-50); color: var(--primary-700); }
.location-dropdown__ciudad--all { font-weight: 500; color: var(--primary-600); }
.location-dropdown__ciudad-count { margin-left: auto; font-size: 0.6875rem; color: var(--gray-400); }

/* Dark mode dropdown - colores fijos (main.css ya cubre .location-dropdown background) */
[data-theme="dark"] .location-dropdown__option,
[data-theme="dark"] .location-dropdown__estado-header,
[data-theme="dark"] .location-dropdown__ciudad { color: #cbd5e1; }
[data-theme="dark"] .location-dropdown__option:hover,
[data-theme="dark"] .location-dropdown__estado-header:hover,
[data-theme="dark"] .location-dropdown__ciudad:hover { background-color: #334155; }
[data-theme="dark"] .location-dropdown__ciudades { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .location-dropdown__estado-count { background: #334155; color: #94a3b8; }
[data-theme="dark"] .location-dropdown__estado--expanded > .location-dropdown__estado-header { background-color: rgba(225,113,1,0.15); }
[data-theme="dark"] .location-dropdown__estado--expanded .location-dropdown__chevron,
[data-theme="dark"] .location-dropdown__option--geo { color: #e17201; }
[data-theme="dark"] .location-dropdown__option--geo:hover { background-color: rgba(225,113,1,0.15); }
[data-theme="dark"] .location-dropdown__ciudad:hover { background-color: rgba(225,113,1,0.15); color: #e17201; }


/* Secciones */
.mercadito-section { margin-bottom: 2.5rem; }

/* Categorias horizontales */
.mercadito-categorias {
    max-width: var(--container-max-width, 1200px);
    margin: 0 auto;
    padding: 1.5rem 0;
    position: relative;
}
.mercadito-categorias-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mercadito-categorias-scroll::-webkit-scrollbar { display: none; }
.mercadito-categoria-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 72px;
    transition: transform 0.2s;
}
.mercadito-categoria-item:hover { transform: translateY(-3px); }
.mercadito-categoria-item:hover .mercadito-categoria-circle { box-shadow: 0 4px 16px rgba(225,113,1,0.3); }
.mercadito-categoria-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: #e17201;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.mercadito-categoria-circle i { line-height: 1; display: flex; }
.mercadito-categoria-item.active .mercadito-categoria-circle {
    background: #e17201;
    color: #fff;
}
.mercadito-categoria-item.active .mercadito-categoria-label {
    color: #e17201;
    font-weight: 600;
}
.mercadito-categoria-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #374151;
    text-align: center;
    max-width: 72px;
    line-height: 1.2;
}
[data-theme="dark"] .mercadito-categoria-circle { background: #1f2937 !important; color: #e17201; border-color: #374151; }
[data-theme="dark"] .mercadito-categoria-item.active .mercadito-categoria-circle { background: #e17201 !important; color: #fff; }
[data-theme="dark"] .mercadito-categoria-label { color: #e2e8f0; }
[data-theme="dark"] .mercadito-categoria-item.active .mercadito-categoria-label { color: #e17201; }

/* Seccion */
.mercadito-section {
    margin-bottom: 2.5rem;
}

/* Grid de productos */
.mercadito-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* Empty state */
.mercadito-products-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300, #d1d5db);
}

.mercadito-products-empty i {
    font-size: 3rem;
    color: var(--gray-300, #d1d5db);
    margin-bottom: 1rem;
    display: block;
}

.mercadito-products-empty h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700, #374151);
    margin: 0 0 0.5rem;
}

.mercadito-products-empty p {
    font-size: 0.9375rem;
    color: var(--gray-500, #6b7280);
    margin: 0 0 1.5rem;
}

/* Dark mode */
html[data-theme="dark"] .mercadito-products-empty {
    background: var(--gray-800, #1f2937);
    border-color: var(--gray-600, #4b5563);
}
html[data-theme="dark"] .mercadito-products-empty h3 { color: var(--gray-100, #f3f4f6); }
html[data-theme="dark"] .mercadito-products-empty p { color: var(--gray-400, #9ca3af); }
html[data-theme="dark"] .mercadito-products-empty i { color: var(--gray-600, #4b5563); }

/* Responsive */
@media (max-width: 768px) {
    .mercadito-grid { grid-template-columns: 1fr; gap: 0.75rem; }
}