/* =========================================
   COMPUSMART SEARCH - LIMPIO / PRO / FINAL
   ========================================= */

.cc-search,
.cc-mobile-search-pro,
.cc-smart-search-form {
    position: relative;
    z-index: 6000;
    overflow: visible !important;
}

.cc-smart-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99999;
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d98bab #fff5f9;
}

.cc-smart-search-results::-webkit-scrollbar {
    width: 8px;
}

.cc-smart-search-results::-webkit-scrollbar-track {
    background: #fff5f9;
    border-radius: 999px;
}

.cc-smart-search-results::-webkit-scrollbar-thumb {
    background: #d98bab;
    border-radius: 999px;
}

.cc-smart-search-panel {
    background: #ffffff;
    border: 1px solid #f1d6e1;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
    overflow: hidden;
    animation: ccSearchFade .18s ease;
}

@keyframes ccSearchFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cc-smart-search-section {
    padding: 14px 16px;
}

.cc-smart-search-section + .cc-smart-search-section {
    border-top: 1px solid #f5e7ee;
}

.cc-smart-search-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #cc5f8f;
    text-transform: uppercase;
}

/* =========================
   CATEGORÍAS
   ========================= */

.cc-smart-search-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cc-smart-search-cat {
    display: grid;
    grid-template-columns: 34px 1fr 14px;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 11px 12px;
    background: linear-gradient(180deg, #fff4f8 0%, #fdebf2 100%);
    border: 1px solid #f2cada;
    border-radius: 16px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all .18s ease;
    box-shadow: 0 4px 12px rgba(247, 181, 205, 0.12);
}

.cc-smart-search-cat:hover {
    transform: translateY(-1px);
    border-color: #e9a8c3;
    box-shadow: 0 10px 20px rgba(247, 181, 205, 0.18);
    background: #fff0f6;
}

.cc-smart-search-cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #f2cada;
    color: #cc5f8f;
    font-size: 13px;
    line-height: 1;
}

.cc-smart-search-cat-text {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #172033;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.cc-smart-search-cat-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #cc5f8f;
    font-size: 12px;
    line-height: 1;
}

/* =========================
   PRODUCTOS
   ========================= */

.cc-smart-search-products {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-smart-search-product {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    text-decoration: none;
    color: #111111;
    transition: background .18s ease, transform .18s ease;
}

.cc-smart-search-product:hover {
    background: #fff7fb;
    transform: translateX(2px);
}

.cc-smart-search-thumb-wrap {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border: 1px solid #f2d9e3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.cc-smart-search-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cc-smart-search-info {
    min-width: 0;
}

.cc-smart-search-name {
    font-size: 14px;
    font-weight: 800;
    color: #14213d;
    line-height: 1.24;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cc-smart-search-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cc-smart-search-meta {
    font-size: 11.5px;
    color: #7b8190;
    line-height: 1.2;
}

.cc-smart-search-price {
    font-size: 14px;
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
}

/* =========================
   FOOTER / VACÍO
   ========================= */

.cc-smart-search-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid #f5e7ee;
    background: #fffafd;
}

.cc-smart-search-more {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(180deg, #f7b5cd 0%, #ea8fb2 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    border-radius: 14px;
    padding: 11px 14px;
    box-shadow: 0 10px 24px rgba(234, 143, 178, 0.22);
    transition: transform .18s ease, box-shadow .18s ease;
}

.cc-smart-search-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(234, 143, 178, 0.28);
}

.cc-smart-search-empty {
    padding: 18px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* =========================
   KEYBOARD ACTIVE
   ========================= */

.cc-smart-search-product.is-active,
.cc-smart-search-cat.is-active,
.cc-smart-search-more.is-active {
    outline: 2px solid #f7b5cd;
    background: #fff7fb;
    border-radius: 16px;
}

.cc-smart-search-mark {
    background: #ffe3ef;
    color: #9d2f61;
    border-radius: 6px;
    padding: 0 3px;
}

/* =========================
   HEADER / NAV NO RECORTAR
   ========================= */

.cc-topbar,
.cc-topbar-inner,
.cc-topbar .cc-container,
.cc-menu,
.cc-menu-inner,
.cc-menu-desktop,
header,
nav {
    overflow: visible !important;
}

.cc-topbar,
.cc-topbar-inner,
.cc-topbar .cc-container {
    max-height: none !important;
}

.cc-topbar {
    position: relative;
    z-index: 3000;
}

.cc-menu {
    position: relative;
    z-index: 1000;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    .cc-smart-search-results {
        top: calc(100% + 8px);
        max-height: 72vh;
    }

    .cc-smart-search-panel {
        border-radius: 18px;
    }

    .cc-smart-search-section {
        padding: 10px 12px;
    }

    .cc-smart-search-title {
        font-size: 11px;
        letter-spacing: .04em;
        margin-bottom: 8px;
    }

    .cc-smart-search-categories {
        gap: 8px;
    }

    .cc-smart-search-cat {
        grid-template-columns: 28px 1fr 12px;
        min-height: 46px;
        padding: 9px 10px;
        border-radius: 14px;
        gap: 8px;
    }

    .cc-smart-search-cat-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .cc-smart-search-cat-text {
        font-size: 12px;
        line-height: 1.15;
    }

    .cc-smart-search-product {
        grid-template-columns: 54px 1fr;
        gap: 10px;
        padding: 8px 6px;
        border-radius: 14px;
    }

    .cc-smart-search-thumb-wrap {
        width: 54px;
        height: 54px;
        min-width: 54px;
        border-radius: 12px;
    }

    .cc-smart-search-name {
        font-size: 13px;
        line-height: 1.2;
    }

    .cc-smart-search-meta {
        font-size: 11px;
    }

    .cc-smart-search-price {
        font-size: 13px;
    }

    .cc-smart-search-footer {
        padding: 10px 12px 12px;
    }

    .cc-smart-search-more {
        border-radius: 12px;
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (min-width: 1025px) {
    .cc-search .cc-smart-search-results {
        top: calc(100% + 4px);
    }
}