/* ============================================================
   Elementor Search Popup — Styles
   ============================================================ */

/* ── Trigger icon ── */
.el-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    line-height: 1;
}
.el-search-icon img,
.el-search-icon svg {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.el-search-icon:hover { opacity: .7; }

/* ── Overlay ── */
.el-search-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 40px;
    box-sizing: border-box;
}

/* ── Popup box ── */
.el-search-popup {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 960px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,.14);
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Search bar ── */
.el-search-popup-bar {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 64px;
    gap: 12px;
    border-bottom: 1px solid #ebebeb;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.el-search-popup-icon {
    color: #555;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.el-search-popup-bar input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    font-family: inherit;
    color: #1a1a1a;
    background: transparent;
    padding: 0;
    min-width: 0;
}
.el-search-popup-bar input::placeholder {
    color: #aaa;
}

.el-search-popup-clear {
    background: none;
    border: none;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
    font-family: inherit;
}
.el-search-popup-clear:hover { color: #333; }

.el-search-popup-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    flex-shrink: 0;
}

.el-search-popup-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
    line-height: 1;
    transition: opacity .15s;
}
.el-search-popup-close:hover { opacity: .5; }

/* ── Body ── */
.el-search-popup-body {
    padding: 24px 28px 28px;
}

.el-search-popup-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 18px;
    color: #1a1a1a;
}

/* ── Product grid ── */
.el-search-popup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Product card ── */
.el-search-popup-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.el-search-popup-card:hover .el-search-popup-card-img img {
    transform: scale(1.03);
}

.el-search-popup-card-img {
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    aspect-ratio: 1;
}
.el-search-popup-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.el-search-popup-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.el-search-popup-card-name {
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.35;
}

.el-search-popup-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ── Empty state ── */
.el-search-popup-empty {
    font-size: 14px;
    color: #888;
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px 0;
}

/* ── Loading dots ── */
.el-search-popup-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 0;
}
.el-search-popup-loading span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bbb;
    animation: el-search-bounce 1.2s infinite ease-in-out both;
}
.el-search-popup-loading span:nth-child(1) { animation-delay: -0.32s; }
.el-search-popup-loading span:nth-child(2) { animation-delay: -0.16s; }
@keyframes el-search-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: .4; }
    40%            { transform: scale(1);   opacity: 1;  }
}

/* ── Footer / See all ── */
.el-search-popup-footer {
    text-align: center;
    margin-top: 28px;
}

.el-search-popup-see-all {
    display: inline-block;
    padding: 14px 40px;
    background: #c5b48a;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 400;
    transition: background .15s;
}
.el-search-popup-see-all:hover {
    background: #b0a07a;
    color: #fff;
    text-decoration: none;
}

/* ── Body lock ── */
body.el-search-popup-open { overflow: hidden; }

/* ── Responsive ── */
@media (max-width: 760px) {
    .el-search-popup-overlay {
        padding: 0;
        align-items: flex-start;
    }
    .el-search-popup {
        border-radius: 0 0 12px 12px;
        max-height: 90vh;
    }
    .el-search-popup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .el-search-popup-body {
        padding: 20px 16px 24px;
    }
}
