/**
 * Copyright since 2026 Ecom Experts
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    Ecom Experts <ecomyseo@gmail.com>
 * @copyright Since 2026 Ecom Experts
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */
/* Sin @import de Google Fonts.
 *
 * Aqui habia un @import de Material Icons (ademas del registerStylesheet del PHP:
 * se cargaba DOS veces). Un @import en CSS ademas bloquea el render hasta que
 * resuelve, y esta hoja la carga TODA la tienda.
 *
 * Se quito por privacidad: enviaba la IP de cada visitante a Google en cada pagina.
 * Los iconos son ahora SVG en linea (classes/EcomSearchIcons.php). */

.ecom-search-trigger-wrapper {
    display: none !important;
}

/* Iconos SVG del modulo. Sin width/height en el SVG: el tamano sale del font-size,
 * asi el icono escala con el texto del tema. currentColor hereda el color. */
.ecom-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    flex: 0 0 auto;
}

/* Compatibilidad: quedan .material-icons en plantillas de terceros o en overrides
 * del comerciante. Si el tema self-hostea la fuente (Classic lo hace) se ven; si no,
 * se ocultan en vez de escupir la palabra "shopping_cart" en pantalla, que es lo que
 * hacen las ligaduras cuando la fuente no carga. */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* CSS for Ecom Search Overlay (Glassmorphism & Animation) */

/* Mobile & Desktop Trigger: Icon Only (Requested) */
.ecom-search-input-mockup {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.ecom-search-input-mockup .search-placeholder {
    display: none !important;
}

.ecom-search-input-mockup .search-icon {
    font-size: 24px;
    color: #333;
}

/* Mobile Trigger Fix: Hide Text on Mobile (Redundant but kept for safety/legacy overrides if needed, though above covers it) */
@media (max-width: 768px) {
    /* .search-placeholder rule removed as it is now global */
}

/* Overlay Container */
.ecom-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.ecom-search-header {
    margin-top: 50px !important;
}

.ecom-search-overlay.is-visible {
    opacity: 1;
}

/* Close Button */
.ecom-search-close {
    position: absolute;
    top: 0.1%;
    right: 6%;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    z-index: 100000;
    transition: transform 0.2s;
}

.ecom-search-close:hover {
    transform: rotate(90deg);
}

/* Main Search Container */
.ecom-search-container {
    width: 100%;
    max-width: 1400px;
    margin-top: 50px;
    padding: 0 20px;
    position: relative;
    box-sizing: border-box;
}

/* Search Input Wrapper - Box Style */
.ecom-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 10px auto;
    background-color: #f3f3f3;
    /* Light grey background */
    border-radius: 8px;
    /* Rounded corners */
    display: flex;
    align-items: center;
    padding: 0 15px;
    /* Padding for the container */
    height: 60px;
    /* Fixed height for consistency */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#ecom-search-input-main {
    flex-grow: 1;
    /* Take available space */
    width: auto;
    font-size: 18px;
    /* Slightly smaller for box fit */
    padding: 0 15px;
    /* spacing text from icons */
    border: none;
    border-bottom: none;
    /* Remove line style */
    background: transparent;
    outline: none;
    font-family: inherit;
    font-weight: 400;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    height: 100%;
}

#ecom-search-input-main:focus {
    border-bottom-color: transparent;
    /* Override */
}

/* Clear Icon */
.search-clear-icon {
    position: relative;
    /* Relative within flex */
    right: auto;
    top: auto;
    transform: none;
    cursor: pointer;
    color: #999;
    padding: 5px;
    margin-left: 10px;
    display: none;
    /* JS toggles this */
}

/* Share Icon */
.ecom-search-share-icon {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    cursor: pointer;
    color: #777;
    transition: color 0.2s;
    z-index: 10;
    padding: 5px;
    font-size: 22px;
    margin-right: 5px;
}

/* New: Search Icon Large */
.search-icon-large {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    color: #555;
    font-size: 24px;
    margin-right: 5px;
}

.ecom-search-share-icon:hover {
    color: #000;
}

/* Initial Content (History, Trends) */
#ecom-search-initial-content {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
}

/* History & Trending Sections */
.ecom-search-section h4,
.ecom-search-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
}

.ecom-search-list-inline,
.ecom-tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.ecom-search-list-inline li,
.ecom-tag-list li {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ecom-search-list-inline li:hover,
.ecom-tag-list li:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/* Loading Spinner */
#ecom-search-loading {
    display: none;
    margin: 40px auto;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results Container (Flex: Sidebar + Grid) */
#ecom-search-results {
    display: none;
    width: 100%;
    margin-top: 30px;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar (Filters) */
.ecom-filters-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    padding: 0;
    /* Reset padding for accordion look */
    border-radius: 8px;
    /* Removed sticky to avoid complex overflow issues with accordion,
       can re-add if container height is managed */
}

/* Filter Group / Accordion Item */
.ecom-filter-group {
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    /* Flush */
}

/* Accordion Header */
.ecom-accordion-header {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    outline: none;
}

.ecom-accordion-header:hover {
    background: #f9f9f9;
}

.ecom-accordion-header::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
}

.ecom-accordion-header.active::after {
    content: '-';
}

/* Accordion Content */
.ecom-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 15px;
    background: #fff;
}

.ecom-accordion-content.open {
    max-height: 500px;
    /* Max height for transition */
    padding-bottom: 20px;
    overflow-y: auto;
    transition: max-height 0.5s ease-in;
}

/* Filter Checkboxes */
.ecom-cat-item,
.ecom-attr-item,
.ecom-feat-item {
    margin-bottom: 8px;
}

.ecom-cat-item label,
.ecom-attr-item label,
.ecom-feat-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.ecom-cat-item label:hover {
    color: #000;
}

.ecom-cat-filter,
.ecom-attr-filter,
.ecom-feat-filter {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #000;
}

/* Results Grid */
#ecom-results-container {
    flex-grow: 1;
    display: grid;
    gap: 20px;
}

/* Active Filter Badges */
.ecom-active-filters-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.ecom-active-filter-badge {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecom-active-filter-badge .material-icons {
    font-size: 16px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.ecom-active-filter-badge .material-icons:hover {
    color: #f44336;
}

.ecom-clear-all-filters {
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    color: #999;
}

.ecom-clear-all-filters:hover {
    color: #333;
}


/* Categories Row */
.ecom-search-categories-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.ecom-cat-chip {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s;
}

.ecom-cat-chip:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.ecom-cat-chip i {
    font-size: 16px;
}

/* Product Item */
.ecom-result-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    /* Reduced from 15px */
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.ecom-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.ecom-result-img-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecom-result-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
}

.ecom-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    flex-grow: 1;
}

.ecom-result-reference {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
    font-weight: 500;
}

.ecom-result-price {
    font-size: 15px;
    font-weight: 700;
    color: #000;
}

/* Highlight */
.ecom-highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

/* --- CSS Range Slider (Modern, clean) --- */
.ecom-slider-container {
    position: relative;
    width: 100%;
    height: 40px;
    margin-top: 15px;
}

.ecom-slider-track {
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.ecom-slider-range {
    position: absolute;
    top: 5px;
    height: 4px;
    background: #000;
    border-radius: 2px;
}

.ecom-range-input {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    /* Lint fix */
    background: transparent;
    pointer-events: none;
    z-index: 2;
    margin: 0;
}

.ecom-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #000;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-top: -7px;
}

.ecom-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #000;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ecom-price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.ecom-price-apply-btn {
    width: 100%;
    margin-top: 15px;
    padding: 8px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s;
}

.ecom-price-apply-btn:hover {
    background: #333;
}

/* Default Desktop: Hide Mobile Toggle */
.ecom-mobile-filter-bar {
    display: none;
}

/* --- Mobile Adaptations --- */
@media (max-width: 768px) {
    #ecom-search-results {
        flex-direction: column;
    }

    /* Mobile Filter Toggle (Main) */
    .ecom-mobile-filter-bar {
        width: 100%;
        margin-bottom: 20px;
        display: block !important;
        /* Force Visible */
    }

    .ecom-mobile-filter-btn {
        width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border: 1px solid #ddd;
        text-align: left;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 4px;
    }

    .ecom-filters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 20px;
        border: none;
        padding: 0;
        display: block !important;
        /* Ensure parent is visible */
    }

    /* Hide Inner Content on Mobile Default */
    .ecom-filters-inner {
        display: none;
        animation: none;
    }

    .ecom-filters-inner.is-mobile-open {
        display: block;
        animation: slideDown 0.3s;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .ecom-search-container {
        padding: 0 15px;
        margin-top: 70px;
        /* Increased to avoid overlap with Close button */
    }

    /* Mobile Close Button Adjustment */
    .ecom-search-close {
        top: 1% !important;

        right: 15px;
        font-size: 30px;
        /* Smaller on mobile */
    }

    #ecom-search-input-main {
        font-size: 16px;
        padding: 10px 10px 10px 0;
    }

    /* Ensure input wrapper doesn't overlap if close button is low */
    /* Ensure input wrapper doesn't overlap if close button is low */
    .ecom-input-wrapper {
        margin-right: 0;
        height: 50px;
        /* Slightly smaller height on mobile */
    }
}

/* --- Initial Content Grid (Layout with Banner) --- */
.ecom-initial-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* .ecom-initial-grid.has-banner .ecom-banner-area {
    display: block;
} */



.ecom-initial-main {
    flex-grow: 1;
    width: 100%;
    /* Fallback */
}

/* Mobile: Stack Banner */
@media (max-width: 768px) {
    .ecom-initial-grid {
        flex-direction: column;
    }
}

/* ==========================================================================
   TEMAS / THEMES
   ========================================================================== */

/* ── 1. DARK ────────────────────────────────────────────────────────────── */
.ecom-theme-dark.ecom-search-overlay {
    background: rgba(12, 17, 35, 0.97);
}
.ecom-theme-dark .ecom-search-close,
.ecom-theme-dark .ecom-search-hint { color: rgba(255,255,255,0.5) !important; }
.ecom-theme-dark .search-icon-large { color: #25b9d7; }
.ecom-theme-dark .ecom-input-wrapper {
    background: rgba(255,255,255,0.07);
    border: 1px solid #25b9d7;
}
.ecom-theme-dark #ecom-search-input-main { color: #fff; }
.ecom-theme-dark #ecom-search-input-main::placeholder { color: rgba(255,255,255,0.4); }
.ecom-theme-dark .ecom-result-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}
.ecom-theme-dark .ecom-result-title { color: #e0e0e0; }
.ecom-theme-dark .ecom-result-price { color: #25b9d7; }
.ecom-theme-dark .ecom-result-reference { color: rgba(255,255,255,0.4); }
.ecom-theme-dark .ecom-accordion-header {
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    background: transparent;
}
.ecom-theme-dark .ecom-filters-inner { background: transparent; }
.ecom-theme-dark .ecom-cat-item label,
.ecom-theme-dark .ecom-attr-item label,
.ecom-theme-dark .ecom-feat-item label { color: #ccc; }
.ecom-theme-dark .ecom-cat-chip {
    background: rgba(37,185,215,0.15);
    color: #25b9d7;
    border-color: rgba(37,185,215,0.3);
}
.ecom-theme-dark .ecom-search-total-header {
    color: rgba(255,255,255,0.5) !important;
    border-bottom-color: rgba(255,255,255,0.1) !important;
}
.ecom-theme-dark .ecom-view-all-link { color: #25b9d7 !important; }
.ecom-theme-dark .ecom-price-apply-btn {
    background: #25b9d7;
    color: #fff;
    border: none;
}
.ecom-theme-dark .ecom-mobile-filter-btn { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.2); }
.ecom-theme-dark .ecom-active-filter-badge { background: rgba(37,185,215,0.2); border-color: #25b9d7; color: #25b9d7; }
.ecom-theme-dark .ecom-highlight { background: rgba(37,185,215,0.3); color: #fff; }
.ecom-theme-dark .ecom-search-section p { color: rgba(255,255,255,0.6); }
.ecom-theme-dark .ecom-tag-list li {
    background: rgba(255,255,255,0.1);
    color: #ccc;
    border-color: rgba(255,255,255,0.15);
}

/* ── 2. TILES ────────────────────────────────────────────────────────────── */
/* Cover images that zoom on hover, price/title overlaid via gradient */
.ecom-theme-compact #ecom-search-results { flex-direction: column; }
.ecom-theme-compact .ecom-filters-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding: 0 0 12px 0;
    margin-bottom: 14px;
    background: transparent;
}
.ecom-theme-compact .ecom-filters-inner {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}
.ecom-theme-compact .ecom-filter-group {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 240px;
    border-bottom: none;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    padding: 6px;
}
.ecom-theme-compact .ecom-mobile-filter-btn { display: none; }
.ecom-theme-compact .ecom-results-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px !important;
}
.ecom-theme-compact .ecom-result-item {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.ecom-theme-compact .ecom-result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}
.ecom-theme-compact .ecom-result-img-wrap {
    height: 200px;
    margin-bottom: 0;
    border-radius: 0;
    background: #ececec;
    position: relative;
}
.ecom-theme-compact .ecom-result-img {
    object-fit: cover;
    transition: transform 0.35s ease;
}
.ecom-theme-compact .ecom-result-item:hover .ecom-result-img {
    transform: scale(1.07);
}
.ecom-theme-compact .ecom-result-title {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 28px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    line-height: 1.3;
    flex-grow: 0;
}
.ecom-theme-compact .ecom-result-price {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px 10px 7px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.62);
}
.ecom-theme-compact .ecom-result-reference { display: none; }
@media (max-width: 768px) {
    .ecom-theme-compact .ecom-results-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .ecom-theme-compact .ecom-result-img-wrap { height: 150px; }
}

/* ── 3. NORDIC ───────────────────────────────────────────────────────────── */
/* Scandinavian clean: thin borders, uppercase labels, lots of whitespace */
.ecom-theme-minimal.ecom-search-overlay { background: #fafaf8; }
.ecom-theme-minimal .ecom-search-container { background: #fafaf8; }
.ecom-theme-minimal .ecom-search-header { background: transparent; border-bottom: 1px solid #e0e0e0; }
.ecom-theme-minimal .ecom-input-wrapper { background: #fff; border: 1.5px solid #ccc; border-radius: 4px; }
.ecom-theme-minimal #ecom-search-input-main { background: transparent; }
.ecom-theme-minimal .ecom-search-hint { color: #bbb !important; }
.ecom-theme-minimal #ecom-search-results { flex-direction: column; }
.ecom-theme-minimal .ecom-filters-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1.5px solid #e0e0e0;
    padding: 0 0 12px 0;
    margin-bottom: 14px;
    background: transparent;
}
.ecom-theme-minimal .ecom-filters-inner {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}
.ecom-theme-minimal .ecom-filter-group {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 220px;
    border-bottom: none;
}
.ecom-theme-minimal .ecom-accordion-header {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555;
    padding: 8px 10px;
}
.ecom-theme-minimal .ecom-mobile-filter-btn { display: none; }
.ecom-theme-minimal .ecom-results-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}
.ecom-theme-minimal .ecom-result-item {
    border: 1.5px solid #e8e8e8;
    border-radius: 4px;
    padding: 14px 14px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
    background: #fff;
}
.ecom-theme-minimal .ecom-result-item:hover {
    border-color: #222;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
    transform: none;
}
.ecom-theme-minimal .ecom-result-img-wrap {
    height: 170px;
    border-radius: 2px;
    background: #f6f6f4;
    margin-bottom: 10px;
}
.ecom-theme-minimal .ecom-result-img { object-fit: contain; }
.ecom-theme-minimal .ecom-result-title {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    margin: 0 0 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-grow: 0;
}
.ecom-theme-minimal .ecom-result-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0;
}
.ecom-theme-minimal .ecom-result-reference { display: none; }
.ecom-theme-minimal .ecom-cat-chip {
    border-radius: 2px;
    background: #fff;
    border: 1px solid #ccc;
    color: #444;
    font-size: 11px;
    letter-spacing: 0.04em;
}
@media (max-width: 768px) {
    .ecom-theme-minimal .ecom-results-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── 4. QUICKLIST ────────────────────────────────────────────────────────── */
/* Clean horizontal list: fast scanning, image left, info right */
.ecom-theme-magazine #ecom-search-results { flex-direction: column; }
.ecom-theme-magazine .ecom-filters-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 0 10px 0;
    margin-bottom: 10px;
    background: transparent;
}
.ecom-theme-magazine .ecom-filters-inner {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}
.ecom-theme-magazine .ecom-filter-group {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 220px;
    border-bottom: none;
}
.ecom-theme-magazine .ecom-mobile-filter-btn { display: none; }
.ecom-theme-magazine .ecom-results-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
}
.ecom-theme-magazine .ecom-result-item {
    display: grid !important;
    grid-template-columns: 88px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 0;
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    background: #fff;
    align-items: center;
    box-shadow: none;
}
.ecom-theme-magazine .ecom-result-item:hover {
    background: #fafafa;
    transform: none;
    box-shadow: none;
}
.ecom-theme-magazine .ecom-result-img-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 88px;
    height: 80px;
    margin-bottom: 0;
    border-radius: 8px;
    background: #f5f5f5;
    flex-shrink: 0;
}
.ecom-theme-magazine .ecom-result-img { object-fit: contain; border-radius: 8px; }
.ecom-theme-magazine .ecom-result-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin: 0;
    flex-grow: 0;
    line-height: 1.4;
}
.ecom-theme-magazine .ecom-result-reference {
    grid-column: 2;
    grid-row: 2;
    font-size: 11px;
    color: #aaa;
    margin: 2px 0 0;
}
.ecom-theme-magazine .ecom-result-price {
    grid-column: 3;
    grid-row: 1 / span 2;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    align-self: center;
    margin: 0;
}
@media (max-width: 768px) {
    .ecom-theme-magazine .ecom-result-item { grid-template-columns: 70px 1fr auto; }
    .ecom-theme-magazine .ecom-result-img-wrap { width: 70px; height: 65px; }
}

/* ── 5. GLASSMORPHISM ───────────────────────────────────────────────────── */
.ecom-theme-glass.ecom-search-overlay {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}
.ecom-theme-glass .ecom-input-wrapper {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.ecom-theme-glass .ecom-result-item {
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ecom-theme-glass .ecom-filters-inner {
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
    padding: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ecom-theme-glass .ecom-accordion-header { background: transparent; }
.ecom-theme-glass .ecom-price-apply-btn { background: #6c63ff; color: #fff; border: none; border-radius: 6px; }
.ecom-theme-glass .ecom-cat-chip {
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
}
.ecom-theme-glass .ecom-highlight { background: rgba(108,99,255,0.25); border-radius: 3px; }

/* ── 6. WARM BOUTIQUE ────────────────────────────────────────────────────── */
/* Cream/terracotta palette: warm boutique feel with sidebar */
.ecom-theme-split.ecom-search-overlay { background: #faf7f2; }
.ecom-theme-split .ecom-search-container { background: #faf7f2; }
.ecom-theme-split .ecom-search-header { background: transparent; border-bottom: 1px solid #e8e0d4; }
.ecom-theme-split .ecom-input-wrapper {
    background: #fff;
    border: 1.5px solid #d4b896;
    border-radius: 6px;
}
.ecom-theme-split #ecom-search-input-main { background: transparent; }
.ecom-theme-split .search-icon-large { color: #c07040; }
.ecom-theme-split .ecom-search-hint { color: #c4aa90 !important; }
.ecom-theme-split .ecom-search-close { color: #888; }
.ecom-theme-split .ecom-filters-sidebar {
    background: #fff8f0;
    border-right: 1.5px solid #e8d8c4;
    border-radius: 8px;
    padding: 20px 14px;
}
.ecom-theme-split .ecom-accordion-header {
    color: #6b4c30;
    background: transparent;
    border-bottom-color: #e8d8c4;
    font-weight: 600;
}
.ecom-theme-split .ecom-cat-item label,
.ecom-theme-split .ecom-attr-item label,
.ecom-theme-split .ecom-feat-item label { color: #5a3e28; }
.ecom-theme-split .ecom-price-apply-btn {
    background: #c07040;
    color: #fff;
    border: none;
    border-radius: 4px;
}
.ecom-theme-split .ecom-mobile-filter-btn { color: #c07040; border-color: #c07040; }
.ecom-theme-split .ecom-accordion-content { background: transparent; }
.ecom-theme-split .ecom-filters-inner { background: transparent; }
.ecom-theme-split .ecom-results-grid { grid-template-columns: repeat(4, 1fr) !important; }
.ecom-theme-split .ecom-result-item {
    background: #fff;
    border: 1px solid #ede5da;
    border-radius: 8px;
}
.ecom-theme-split .ecom-result-item:hover {
    border-color: #c07040;
    box-shadow: 0 6px 18px rgba(192,112,64,0.12);
}
.ecom-theme-split .ecom-result-title { color: #3d2810; }
.ecom-theme-split .ecom-result-price { color: #c07040; font-weight: 700; }
.ecom-theme-split .ecom-result-img-wrap { background: #fdf8f4; }
.ecom-theme-split .ecom-cat-chip {
    background: #fff8f0;
    border-color: #d4b896;
    color: #7a5030;
}
.ecom-theme-split .ecom-highlight { background: rgba(192,112,64,0.18); color: #7a3010; }
.ecom-theme-split .ecom-tag-list li { background: #fff8f0; border-color: #e8d0b8; color: #7a5030; }
@media (max-width: 768px) {
    .ecom-theme-split .ecom-filters-sidebar { border-right: none; border-bottom: 1.5px solid #e8d8c4; }
    .ecom-theme-split .ecom-results-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── 7. SIDEBAR RIGHT ───────────────────────────────────────────────────── */
.ecom-theme-sidebar-right #ecom-search-results {
    flex-direction: row-reverse;
}
.ecom-theme-sidebar-right .ecom-results-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}
.ecom-theme-sidebar-right .ecom-filters-sidebar {
    border-left: 1px solid #eee;
    border-right: none;
    padding-left: 20px;
}
@media (max-width: 768px) {
    .ecom-theme-sidebar-right #ecom-search-results { flex-direction: column; }
    .ecom-theme-sidebar-right .ecom-filters-sidebar { border-left: none; border-top: 1px solid #eee; padding-left: 0; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PRICE SLIDER VARIANTS  —  class on #ecom-search-overlay: ecom-price-style-X
   5 FORMATS (not just colors — each has a distinct layout/structure)
   Options: default | slim | gradient | pill | minimal | neon
══════════════════════════════════════════════════════════════════════════ */

/* ── FORMAT 2: slim = BUBBLE ─────────────────────────────────────────────
   Value labels float above the thumbs as tooltip bubbles.
   JS in front.js positions them via left: X% on each update.         */
.ecom-price-style-slim .ecom-slider-container {
    height: 60px;    /* extra room for bubbles above track */
    padding-top: 34px;
    margin-top: 8px;
}
.ecom-price-style-slim .ecom-slider-track { top: 39px; height: 4px; background: #ddd; }
.ecom-price-style-slim .ecom-slider-range  { top: 39px; height: 4px; background: #2196f3; }
.ecom-price-style-slim .ecom-range-input   { top: 29px; }
.ecom-price-style-slim .ecom-range-input::-webkit-slider-thumb { background: #2196f3; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(33,150,243,0.45); width: 20px; height: 20px; }
.ecom-price-style-slim .ecom-range-input::-moz-range-thumb     { background: #2196f3; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(33,150,243,0.45); width: 20px; height: 20px; border-radius: 50%; }
/* Labels repositioned as floating bubbles (JS sets their left: X%) */
.ecom-price-style-slim .ecom-price-labels {
    position: absolute;
    top: 4px;
    left: 0;
    width: 100%;
    height: 0;
    margin: 0;
    overflow: visible;
    pointer-events: none;
}
.ecom-price-style-slim .ecom-price-labels span {
    position: absolute;
    background: #2196f3;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    transform: translateX(-50%);
    transition: left 0.08s linear;
    pointer-events: none;
}
.ecom-price-style-slim .ecom-price-labels span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2196f3;
    border-bottom: 0;
}
/* The slider-container needs relative for bubble positioning */
.ecom-price-style-slim .ecom-accordion-content { position: relative; }
.ecom-price-style-slim .ecom-price-apply-btn { background: #2196f3; color: #fff; border: none; margin-top: 20px; }
.ecom-price-style-slim .ecom-price-apply-btn:hover { background: #1565c0; }

/* ── FORMAT 3: gradient = INLINE ─────────────────────────────────────────
   Min/max labels shown inline LEFT and RIGHT of the slider track.
   No labels below — they sit on the same row as the track itself.    */
.ecom-price-style-gradient .ecom-accordion-content.open {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
    padding-bottom: 10px !important;
}
.ecom-price-style-gradient .ecom-slider-container { grid-column: 2; grid-row: 1; margin-top: 0; }
.ecom-price-style-gradient .ecom-price-labels { display: contents; }
.ecom-price-style-gradient #ecom-label-min { grid-column: 1; grid-row: 1; font-size: 12px; font-weight: 700; color: #4caf50; white-space: nowrap; }
.ecom-price-style-gradient #ecom-label-max { grid-column: 3; grid-row: 1; font-size: 12px; font-weight: 700; color: #4caf50; white-space: nowrap; }
.ecom-price-style-gradient .ecom-price-apply-btn { grid-column: 1 / -1; grid-row: 2; margin-top: 12px; background: #4caf50; color: #fff; border: none; border-radius: 6px; }
.ecom-price-style-gradient .ecom-price-apply-btn:hover { background: #388e3c; }
.ecom-price-style-gradient .ecom-slider-track { background: #e8f5e9; height: 4px; }
.ecom-price-style-gradient .ecom-slider-range  { background: #4caf50; height: 4px; }
.ecom-price-style-gradient .ecom-range-input::-webkit-slider-thumb { background: #4caf50; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(76,175,80,0.4); }
.ecom-price-style-gradient .ecom-range-input::-moz-range-thumb     { background: #4caf50; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(76,175,80,0.4); width: 18px; height: 18px; border-radius: 50%; }

/* ── FORMAT 4: pill = LARGE (touch-friendly) ─────────────────────────────
   Extra-large track (12px), big thumbs (30px). Ideal for touch screens. */
.ecom-price-style-pill .ecom-slider-container { height: 50px; padding-top: 10px; }
.ecom-price-style-pill .ecom-slider-track { height: 12px; top: 14px; border-radius: 6px; background: #ffe3cc; }
.ecom-price-style-pill .ecom-slider-range { height: 12px; top: 14px; background: #ff7043; border-radius: 6px; }
.ecom-price-style-pill .ecom-range-input  { top: 4px; }
.ecom-price-style-pill .ecom-range-input::-webkit-slider-thumb { width: 30px; height: 30px; background: #ff7043; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(255,112,67,0.45); }
.ecom-price-style-pill .ecom-range-input::-moz-range-thumb     { width: 30px; height: 30px; background: #ff7043; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(255,112,67,0.45); border-radius: 50%; }
.ecom-price-style-pill .ecom-price-labels { font-size: 14px; font-weight: 700; color: #ff7043; margin-top: 30px; }
.ecom-price-style-pill .ecom-price-apply-btn { background: #ff7043; color: #fff; border: none; border-radius: 8px; padding: 12px; font-size: 14px; }
.ecom-price-style-pill .ecom-price-apply-btn:hover { background: #e64a19; }

/* ── FORMAT 5: minimal = ULTRA-MINIMAL ──────────────────────────────────
   1px hairline track, 10px dot thumbs, transparent ghost button.     */
.ecom-price-style-minimal .ecom-slider-container { height: 30px; }
.ecom-price-style-minimal .ecom-slider-track { height: 1px; top: 9px; background: #ccc; }
.ecom-price-style-minimal .ecom-slider-range { height: 1px; top: 9px; background: #333; }
.ecom-price-style-minimal .ecom-range-input::-webkit-slider-thumb { width: 10px; height: 10px; background: #333; border: none; box-shadow: none; }
.ecom-price-style-minimal .ecom-range-input::-moz-range-thumb     { width: 10px; height: 10px; background: #333; border: none; box-shadow: none; border-radius: 50%; }
.ecom-price-style-minimal .ecom-price-labels { font-size: 11px; color: #888; margin-top: 20px; }
.ecom-price-style-minimal .ecom-price-apply-btn { background: transparent; color: #555; border: 1px solid #ddd; border-radius: 3px; font-size: 11px; text-transform: none; letter-spacing: 0; padding: 6px; }
.ecom-price-style-minimal .ecom-price-apply-btn:hover { background: #f8f8f8; }

/* ── FORMAT 6: neon = INPUT BOXES ────────────────────────────────────────
   Two number input boxes replace the range slider entirely.
   JS in front.js renders a different HTML structure for this format.  */
.ecom-price-inputs-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 4px;
}
.ecom-price-input-num {
    flex: 1;
    border: 1.5px solid #b39ddb;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4527a0;
    background: #f3e5f5;
    outline: none;
    text-align: center;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
    appearance: textfield;
}
.ecom-price-input-num::-webkit-inner-spin-button,
.ecom-price-input-num::-webkit-outer-spin-button { -webkit-appearance: none; }
.ecom-price-input-num:focus { border-color: #7c4dff; background: #ede7f6; }
.ecom-price-inputs-sep { color: #999; font-size: 16px; flex-shrink: 0; }
.ecom-price-style-neon .ecom-price-apply-btn { background: #7c4dff; color: #fff; border: none; border-radius: 6px; }
.ecom-price-style-neon .ecom-price-apply-btn:hover { background: #4527a0; }

/* ══════════════════════════════════════════════════════════════════════════
   CATEGORY FILTER VARIANTS  —  class on #ecom-search-overlay: ecom-cat-style-X
   Options: default | pills | outlined | flat | tags
══════════════════════════════════════════════════════════════════════════ */

/* pills — round pill chips, checkbox hidden */
.ecom-cat-style-pills .ecom-cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ecom-cat-style-pills .ecom-cat-item { margin-bottom: 0; }
.ecom-cat-style-pills .ecom-cat-item label {
    background: #f5f5f5; border: 1.5px solid #e0e0e0; border-radius: 20px;
    padding: 5px 12px; font-size: 12px; color: #444;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.ecom-cat-style-pills .ecom-cat-filter { display: none; }
.ecom-cat-style-pills .ecom-cat-item label:hover { background: #000; color: #fff; border-color: #000; }
.ecom-cat-style-pills .ecom-cat-item:has(input:checked) label { background: #000 !important; color: #fff !important; border-color: #000 !important; }

/* outlined — bordered chips with blue accent on selected */
.ecom-cat-style-outlined .ecom-cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ecom-cat-style-outlined .ecom-cat-item { margin-bottom: 0; }
.ecom-cat-style-outlined .ecom-cat-item label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border: 1.5px solid #ccc; border-radius: 6px;
    font-size: 12px; color: #333; cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.ecom-cat-style-outlined .ecom-cat-filter { accent-color: #25b9d7; margin-right: 0; width: 13px; height: 13px; }
.ecom-cat-style-outlined .ecom-cat-item label:hover { border-color: #25b9d7; color: #000; }
.ecom-cat-style-outlined .ecom-cat-item:has(input:checked) label { border-color: #25b9d7; background: rgba(37,185,215,0.08); color: #0c7a91; }

/* flat — text links, no checkbox visible */
.ecom-cat-style-flat .ecom-cat-item label {
    font-size: 13px; color: #555; padding: 4px 0;
    border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.ecom-cat-style-flat .ecom-cat-filter { display: none; }
.ecom-cat-style-flat .ecom-cat-item label:hover { color: #000; border-bottom-color: #000; }
.ecom-cat-style-flat .ecom-cat-item:has(input:checked) label { color: #000; font-weight: 700; border-bottom-color: #000; }

/* tags — square tag chips */
.ecom-cat-style-tags .ecom-cat-list { display: flex; flex-wrap: wrap; gap: 5px; }
.ecom-cat-style-tags .ecom-cat-item { margin-bottom: 0; }
.ecom-cat-style-tags .ecom-cat-item label {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f0f0f0; padding: 4px 10px; border-radius: 3px;
    font-size: 12px; color: #333; border: 1px solid #e0e0e0; transition: all 0.2s;
}
.ecom-cat-style-tags .ecom-cat-filter { display: none; }
.ecom-cat-style-tags .ecom-cat-item label:hover { background: #e0e0e0; border-color: #bbb; }
.ecom-cat-style-tags .ecom-cat-item:has(input:checked) label { background: #1a237e; color: #fff; border-color: #1a237e; }

/* ══════════════════════════════════════════════════════════════════════════
   FEATURES FILTER VARIANTS  —  class on #ecom-search-overlay: ecom-feat-style-X
   Options: default | pills | outlined | flat | tags
   (mirrors cat-style variants, same 5 designs)
══════════════════════════════════════════════════════════════════════════ */

/* pills */
.ecom-feat-style-pills .ecom-feat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ecom-feat-style-pills .ecom-feat-item { margin-bottom: 0; }
.ecom-feat-style-pills .ecom-feat-item label {
    background: #f5f5f5; border: 1.5px solid #e0e0e0; border-radius: 20px;
    padding: 5px 12px; font-size: 12px; color: #444;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.ecom-feat-style-pills .ecom-feat-filter { display: none; }
.ecom-feat-style-pills .ecom-feat-item label:hover { background: #000; color: #fff; border-color: #000; }
.ecom-feat-style-pills .ecom-feat-item:has(input:checked) label { background: #000 !important; color: #fff !important; border-color: #000 !important; }

/* outlined */
.ecom-feat-style-outlined .ecom-feat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ecom-feat-style-outlined .ecom-feat-item { margin-bottom: 0; }
.ecom-feat-style-outlined .ecom-feat-item label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border: 1.5px solid #ccc; border-radius: 6px;
    font-size: 12px; color: #333; cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.ecom-feat-style-outlined .ecom-feat-filter { accent-color: #25b9d7; margin-right: 0; width: 13px; height: 13px; }
.ecom-feat-style-outlined .ecom-feat-item label:hover { border-color: #25b9d7; color: #000; }
.ecom-feat-style-outlined .ecom-feat-item:has(input:checked) label { border-color: #25b9d7; background: rgba(37,185,215,0.08); color: #0c7a91; }

/* flat */
.ecom-feat-style-flat .ecom-feat-item label {
    font-size: 13px; color: #555; padding: 4px 0;
    border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.ecom-feat-style-flat .ecom-feat-filter { display: none; }
.ecom-feat-style-flat .ecom-feat-item label:hover { color: #000; border-bottom-color: #000; }
.ecom-feat-style-flat .ecom-feat-item:has(input:checked) label { color: #000; font-weight: 700; border-bottom-color: #000; }

/* tags */
.ecom-feat-style-tags .ecom-feat-list { display: flex; flex-wrap: wrap; gap: 5px; }
.ecom-feat-style-tags .ecom-feat-item { margin-bottom: 0; }
.ecom-feat-style-tags .ecom-feat-item label {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f0f0f0; padding: 4px 10px; border-radius: 3px;
    font-size: 12px; color: #333; border: 1px solid #e0e0e0; transition: all 0.2s;
}
.ecom-feat-style-tags .ecom-feat-filter { display: none; }
.ecom-feat-style-tags .ecom-feat-item label:hover { background: #e0e0e0; border-color: #bbb; }
.ecom-feat-style-tags .ecom-feat-item:has(input:checked) label { background: #1a237e; color: #fff; border-color: #1a237e; }

/* ===== Federated Search Providers (grupos de otras fuentes) ===== */
.ecom-provider-group { grid-column: 1 / -1; width: 100%; margin: 4px 0 12px; }
.ecom-provider-group-header {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.8em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
    color: #666; padding-bottom: 5px; margin-bottom: 8px; border-bottom: 1px solid #eee;
}
.ecom-provider-group-header .material-icons { font-size: 15px; }
.ecom-provider-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ecom-provider-item {
    display: flex; align-items: center; gap: 8px; padding: 5px 8px;
    border: 1px solid #eee; border-radius: 6px; text-decoration: none; color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s; background: #fff;
}
.ecom-provider-item:hover { border-color: #ddd; box-shadow: 0 1px 5px rgba(0,0,0,0.08); }
.ecom-provider-img-wrap { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 5px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f5f5f5; }
.ecom-provider-img { width: 100%; height: 100%; object-fit: cover; }
.ecom-provider-img-fallback .material-icons { font-size: 18px; color: #bbb; }
.ecom-provider-item-body { min-width: 0; flex: 1; }
.ecom-provider-item-title { font-size: 0.82em; font-weight: 500; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecom-provider-item-sub { font-size: 0.72em; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecom-provider-item-price { font-size: 0.76em; color: #333; font-weight: 600; margin-top: 1px; }
@media (max-width: 768px) {
    .ecom-provider-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ===== Productos asociados a una entidad (libros del autor) en su propia fila ===== */
.ecom-entity-products { margin: 6px 0 16px; }
.ecom-entity-products-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.9em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
    color: #333; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid #eee;
}
.ecom-entity-products-header .material-icons { font-size: 18px; }
.ecom-entity-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
}
@media (max-width: 768px) {
    .ecom-entity-products-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ===== Formatos de popup (para que no parezca otra pagina) ===== */
.ecom-search-overlay { --ecom-header-offset: 80px; }

/* Panel centrado: fondo oscurecido, tienda visible detras */
.ecom-search-overlay.ecom-layout-panel {
    background: rgba(20, 22, 30, 0.55);
    align-items: flex-start;
    justify-content: center;
}
.ecom-layout-panel .ecom-search-container {
    max-width: 960px;
    width: 94%;
    margin: 5vh auto;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.40);
    padding-top: 10px;
}
.ecom-layout-panel .ecom-search-header { margin-top: 20px !important; }

/* Desplegable anclado bajo el buscador/cabecera */
.ecom-search-overlay.ecom-layout-dropdown {
    background: rgba(20, 22, 30, 0.45);
    align-items: flex-start;
    justify-content: center;
}
.ecom-layout-dropdown .ecom-search-container {
    max-width: 1000px;
    width: 96%;
    margin: calc(var(--ecom-header-offset, 80px) + 8px) auto 0 auto;
    max-height: calc(100vh - var(--ecom-header-offset, 80px) - 30px);
    overflow-y: auto;
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.ecom-layout-dropdown .ecom-search-header { margin-top: 16px !important; }

/* Pantalla completa por debajo de la cabecera (header real visible) */
.ecom-search-overlay.ecom-layout-belowheader {
    top: var(--ecom-header-offset, 80px);
    height: calc(100vh - var(--ecom-header-offset, 80px));
    background: rgba(255, 255, 255, 0.98);
}

/* Logo de la tienda dentro del popup */
.ecom-search-brandbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 10px 0 10px;
}
/* height (no max-height): max-height solo limita hacia abajo y no deja AGRANDAR el
 * logo por encima de su tamano natural. Con height + width:auto el logo se escala al
 * alto exacto (sube o baja) manteniendo la proporcion. El valor real lo pone el
 * estilo inline del tpl segun la config; este es el fallback. */
.ecom-search-logo { height: 46px; width: auto; max-width: 100%; object-fit: contain; }

/* Usar la fuente de la tienda (hereda del tema, no carga Inter) */
.ecom-search-overlay.ecom-store-font,
.ecom-search-overlay.ecom-store-font .ecom-search-container,
.ecom-search-overlay.ecom-store-font input,
.ecom-search-overlay.ecom-store-font button,
.ecom-search-overlay.ecom-store-font a,
.ecom-search-overlay.ecom-store-font div,
.ecom-search-overlay.ecom-store-font span,
.ecom-search-overlay.ecom-store-font p,
.ecom-search-overlay.ecom-store-font h1,
.ecom-search-overlay.ecom-store-font h2,
.ecom-search-overlay.ecom-store-font h3 {
    font-family: inherit !important;
}
.ecom-search-overlay.ecom-store-font .material-icons {
    font-family: 'Material Icons' !important;
}

/* Color de acento del tema (o el configurado por hex) */
.ecom-search-overlay.ecom-accent {
    --ecom-accent-eff: var(--ecom-accent, var(--primary, var(--main-color, var(--color-primary, #1a237e))));
}
.ecom-accent .ecom-view-all-link,
.ecom-accent .ecom-highlight,
.ecom-accent .ecom-provider-group-header { color: var(--ecom-accent-eff) !important; }
.ecom-accent .ecom-price-apply-btn,
.ecom-accent .ecom-clear-all-filters,
.ecom-accent .ecom-active-filter-badge {
    background: var(--ecom-accent-eff) !important;
    border-color: var(--ecom-accent-eff) !important;
    color: #fff !important;
}
.ecom-accent .ecom-cat-chip:hover,
.ecom-accent .ecom-provider-item:hover { border-color: var(--ecom-accent-eff) !important; }

@media (max-width: 768px) {
    .ecom-layout-panel .ecom-search-container,
    .ecom-layout-dropdown .ecom-search-container {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
    .ecom-search-overlay.ecom-layout-belowheader {
        top: 0;
        height: 100vh;
    }
}

/* ------------------------------------------------------------------ */
/* Marketing / merchandising                                           */
/* ------------------------------------------------------------------ */
.ecom-mkt-block {
    grid-column: 1 / -1;
    width: 100%;
    display: block;
    margin: 0 0 18px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

a.ecom-mkt-block:hover {
    opacity: .92;
}

.ecom-mkt-block .ecom-mkt-title {
    font-size: 1.05em;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--ecom-accent, #333);
}

.ecom-mkt-block .ecom-mkt-sub {
    font-size: .9em;
    color: #666;
    margin: 0 0 10px;
}

.ecom-mkt-pic,
.ecom-mkt-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ecom-mkt-video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ecom-mkt-html {
    font-size: .92em;
    line-height: 1.5;
}

.ecom-mkt-cta {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    border-radius: 4px;
    background: var(--ecom-accent, #333);
    color: #fff;
    font-weight: 600;
    font-size: .88em;
    text-decoration: none;
}

.ecom-mkt-cta:hover {
    filter: brightness(1.1);
    color: #fff;
}

/* Bloques de ofertas / novedades: reutilizan la tarjeta de producto */
.ecom-mkt-offers,
.ecom-mkt-new {
    padding: 16px;
    background: #fafafa;
    border: 1px solid #eee;
}

.ecom-mkt-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* El bloque de "sin resultados" es el que mas rescata: destacalo */
.ecom-search-results .ecom-mkt-block.ecom-mkt-link,
.ecom-search-results .ecom-mkt-block.ecom-mkt-html {
    padding: 18px;
    background: #fafafa;
    border: 1px solid #eee;
    text-align: center;
}

@media (max-width: 768px) {
    .ecom-mkt-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Slots de marketing: cabecera, columnas laterales --- */

/* Cabecera: bajo el buscador, siempre visible. Compacta a proposito: si crece,
   empuja los resultados fuera de la pantalla. */
.ecom-mkt-header {
    max-width: 900px;
    margin: 12px auto 0;
    width: 100%;
}

.ecom-mkt-header .ecom-mkt-block {
    margin-bottom: 0;
}

.ecom-mkt-header .ecom-mkt-img,
.ecom-mkt-header .ecom-mkt-video {
    max-height: 110px;
    width: auto;
    margin: 0 auto;
}

.ecom-mkt-header .ecom-mkt-title {
    font-size: .95em;
}

/* Columna izquierda: los bloques se ajustan al ancho del sidebar */
#ecom-mkt-sidebar-top .ecom-mkt-block,
#ecom-mkt-sidebar-bottom .ecom-mkt-block {
    margin-bottom: 14px;
    padding: 0;
}

#ecom-mkt-sidebar-bottom .ecom-mkt-block {
    margin-top: 14px;
    margin-bottom: 0;
}

#ecom-mkt-sidebar-top .ecom-mkt-products,
#ecom-mkt-sidebar-bottom .ecom-mkt-products,
.ecom-mkt-right-col .ecom-mkt-products {
    grid-template-columns: 1fr;
}

#ecom-mkt-sidebar-top .ecom-mkt-offers,
#ecom-mkt-sidebar-bottom .ecom-mkt-offers,
#ecom-mkt-sidebar-top .ecom-mkt-new,
#ecom-mkt-sidebar-bottom .ecom-mkt-new {
    padding: 10px;
}

/* Columna derecha: solo existe si hay una regla activa (la crea el JS) */
.ecom-mkt-right-col {
    flex: 0 0 240px;
    max-width: 240px;
    padding-left: 18px;
    box-sizing: border-box;
}

.ecom-mkt-right-col .ecom-mkt-block {
    margin-bottom: 14px;
    padding: 0;
}

.ecom-mkt-right-col .ecom-mkt-offers,
.ecom-mkt-right-col .ecom-mkt-new {
    padding: 10px;
}

/* En moviles no hay columnas: todo se apila y la derecha va al final */
@media (max-width: 992px) {
    .ecom-mkt-right-col {
        flex: 1 1 100%;
        max-width: 100%;
        padding-left: 0;
        padding-top: 18px;
    }

    .ecom-mkt-header .ecom-mkt-img,
    .ecom-mkt-header .ecom-mkt-video {
        max-height: 70px;
    }
}

/* Opt-in del historial: consentimiento en su contexto, sin depender del CMP */
.ecom-history-optin {
    margin-top: 8px;
}

.ecom-history-optin-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, .3);
    color: inherit;
    opacity: .75;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    line-height: 1.3;
    text-align: left;
}

.ecom-history-optin-btn:hover {
    opacity: 1;
    border-color: var(--ecom-accent, currentColor);
}

/* --- "Los que buscaron esto tambien buscaron" --- */
.ecom-related-terms {
    grid-column: 1 / -1;
    width: 100%;
    margin: 18px 0 4px;
    padding-top: 14px;
    border-top: 1px solid rgba(128, 128, 128, .18);
}

.ecom-related-terms-header {
    font-size: .82em;
    opacity: .65;
    margin-bottom: 8px;
}

.ecom-related-terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ecom-related-term {
    background: none;
    border: 1px solid rgba(128, 128, 128, .35);
    color: inherit;
    border-radius: 14px;
    padding: 5px 13px;
    font-size: .85em;
    cursor: pointer;
    line-height: 1.3;
}

.ecom-related-term:hover {
    border-color: var(--ecom-accent, currentColor);
    color: var(--ecom-accent, inherit);
}

/* --- "Se suelen comprar juntos" --- */
.ecom-cobuy {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(128, 128, 128, .18);
}

.ecom-cobuy-header {
    font-size: .88em;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: .85;
}

.ecom-cobuy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .ecom-cobuy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Productos de las categorias coincidentes --- */
.ecom-catprod {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(128, 128, 128, .18);
}

.ecom-catprod-header {
    font-size: .88em;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: .9;
}

.ecom-catprod-header .ecom-catprod-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ecom-catprod-header .ecom-catprod-link:hover {
    color: var(--ecom-accent, inherit);
}

.ecom-catprod-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .ecom-catprod-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
