/* ── Desktop Search Wrapper ── */
.eks-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0, auto;
}

.eks-search-input {
    width: 100%;
    height: 42px;
    padding: 8px 16px 8px 42px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.eks-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.eks-search-input:focus {
    outline: none;
    background: #fff;
    color: #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.eks-search-input:focus::placeholder {
    color: #aaa;
}

.eks-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: color 0.25s ease;
    z-index: 1;
}

.eks-search-input:focus ~ .eks-search-icon,
.eks-search-wrapper:focus-within .eks-search-icon {
    color: #7f2aa8;
}

/* ── Desktop Dropdown ── */
.eks-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 480px;
    overflow-y: auto;
    animation: eksDropdownIn 0.2s ease-out;
}

@keyframes eksDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Sections inside dropdown / overlay ── */
.eks-search-section {
    padding: 12px 16px;
}

.eks-search-section + .eks-search-section {
    border-top: 1px solid #f0f0f0;
}

.eks-search-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}

/* ── Suggestion Items ── */
.eks-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
}

.eks-suggestion-item:hover,
.eks-suggestion-item.active {
    background: #f5f0fa;
}

.eks-suggestion-icon {
    width: 18px;
    height: 18px;
    color: #7f2aa8;
    flex-shrink: 0;
}

/* ── Product Items ── */
.eks-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.eks-product-item:hover,
.eks-product-item.active {
    background: #f5f0fa;
}

.eks-product-thumb {
    width: 56px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}

.eks-product-info {
    flex: 1;
    min-width: 0;
}

.eks-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.eks-product-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.eks-product-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(
        135deg,
        rgba(127, 42, 168, 0.1),
        rgba(225, 0, 83, 0.1)
    );
    color: #7f2aa8;
}

.eks-product-creator {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Category Chips ── */
.eks-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eks-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    background: #f5f0fa;
    color: #7f2aa8;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid transparent;
}

.eks-category-chip:hover {
    background: #7f2aa8;
    color: #fff;
    border-color: #7f2aa8;
}

/* ── Loading Spinner ── */
.eks-search-loading {
    display: flex;
    justify-content: center;
    padding: 24px 16px;
}

.eks-search-loading .spinner-border {
    width: 24px;
    height: 24px;
    border-width: 2px;
    color: #7f2aa8;
}

/* ── Empty State ── */
.eks-search-empty {
    text-align: center;
    padding: 24px 16px;
    color: #999;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════
   Mobile Search Button
   ═══════════════════════════════════════════════════════ */
.eks-search-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════
   Mobile Overlay
   ═══════════════════════════════════════════════════════ */
.eks-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: #fff;
    display: flex;
    flex-direction: column;
    animation: eksOverlayIn 0.25s ease-out;
}

@keyframes eksOverlayIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eks-overlay-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}

.eks-overlay-back {
    background: none;
    border: none;
    padding: 8px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.eks-overlay-back:hover {
    background: #f5f0fa;
}

.eks-overlay-input-wrapper {
    flex: 1;
    position: relative;
}

.eks-overlay-input {
    width: 100%;
    height: 40px;
    padding: 8px 16px 8px 38px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 15px;
    color: #333;
    transition: border-color 0.2s;
}

.eks-overlay-input:focus {
    outline: none;
    border-color: #7f2aa8;
}

.eks-overlay-input::placeholder {
    color: #bbb;
}

.eks-overlay-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.eks-overlay-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Scrollbar styling ── */
.eks-search-dropdown::-webkit-scrollbar,
.eks-overlay-body::-webkit-scrollbar {
    width: 4px;
}

.eks-search-dropdown::-webkit-scrollbar-thumb,
.eks-overlay-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
