/* ==========================================================================
   AGORAmilk - Spotlight Search (Ctrl+K) & Product Image Zoom
   ========================================================================== */

/* 1. Header Search Trigger Button */
.header-search-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(26, 74, 118, 0.12);
    border-radius: 24px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    height: 38px;
}

.header-search-btn:hover {
    background: #ffffff;
    color: var(--primary-blue, #1a4a76);
    border-color: rgba(26, 74, 118, 0.3);
    box-shadow: 0 4px 12px rgba(26, 74, 118, 0.08);
}

.header-search-kbd {
    font-size: 11px;
    font-family: inherit;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 6px;
    line-height: 1;
}

/* 2. Spotlight Overlay */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
}

.spotlight-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* 3. Spotlight Dialog Card */
.spotlight-dialog {
    width: 640px;
    max-width: 92vw;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.96) translateY(-10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Montserrat', sans-serif;
    max-height: 75vh;
}

.spotlight-overlay.is-active .spotlight-dialog {
    transform: scale(1) translateY(0);
}

/* 4. Search Input Box */
.spotlight-search-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    background: #ffffff;
}

.spotlight-icon {
    color: #1a4a76;
    flex-shrink: 0;
}

.spotlight-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    font-family: inherit;
    background: transparent;
    padding: 0;
}

.spotlight-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.spotlight-esc-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    flex-shrink: 0;
}

/* 5. Spotlight Results List */
.spotlight-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: 420px;
}

.spotlight-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    cursor: pointer;
}

.spotlight-item:hover,
.spotlight-item.is-selected {
    background: #f0f7ff;
}

.spotlight-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.spotlight-item-thumb img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.spotlight-item-info {
    flex: 1;
    min-width: 0;
}

.spotlight-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-item-title mark {
    background: rgba(242, 140, 40, 0.2);
    color: #d97706;
    font-weight: 800;
    padding: 0 2px;
    border-radius: 2px;
}

.spotlight-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.spotlight-item-category {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.spotlight-item-price {
    font-size: 14px;
    font-weight: 800;
    color: #1a4a76;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Quick Tags on Empty Search */
.spotlight-quick-tags {
    padding: 20px;
}

.spotlight-tags-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.spotlight-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spotlight-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spotlight-chip:hover {
    background: var(--primary-blue, #1a4a76);
    color: #ffffff;
    border-color: var(--primary-blue, #1a4a76);
    transform: translateY(-1px);
}

/* 6. Spotlight Footer */
.spotlight-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
}

.spotlight-hints {
    display: flex;
    gap: 14px;
}

.spotlight-hint {
    display: flex;
    align-items: center;
    gap: 5px;
}

.spotlight-hint kbd {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 10px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 7. Product Detail Image Zoom */
.product-zoom-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    border-radius: 16px;
}

.product-zoom-lens {
    position: absolute;
    border: 2px solid rgba(242, 140, 40, 0.7);
    background: rgba(242, 140, 40, 0.1);
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(242, 140, 40, 0.3);
    z-index: 10;
}

.product-zoom-result {
    position: absolute;
    top: 0;
    left: 105%;
    width: 380px;
    height: 380px;
    border-radius: 16px;
    background-repeat: no-repeat;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 100;
    display: none;
    background-color: #ffffff;
}

@media (max-width: 992px) {
    .product-zoom-result {
        display: none !important;
    }
}
