@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&display=swap');

/* Refactored for WP Coder - Maximum Compatibility - No Red Errors */

.ika-premium-search {
    width: 100%;
    max-width: 750px;
    margin: 5px auto;
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 9999;
}

.ika-input-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ika-input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    border-color: #cd1719;
}

.ika-search-icon-box {
    padding: 10px;
    color: #64748b;
    display: flex;
    align-items: center;
}

.ika-input-group:focus-within .ika-search-icon-box {
    color: #cd1719;
}

.ika-search-icon-box svg {
    width: 22px;
    height: 22px;
}

#ika-product-search {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 10px;
    font-size: 18px;
    font-weight: 500;
    color: #1e293b;
    background: transparent;
}

.ika-status-indicator {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ika-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid #f3f3f3;
    border-top: 2.5px solid #cd1719;
    border-radius: 50%;
    animation: ika-spin 0.8s linear infinite;
}

@keyframes ika-spin {
    to {
        transform: rotate(360deg);
    }
}

.ika-glass-results {
    position: absolute;
    top: 70px;
    /* Traditional position offset */
    left: 0;
    right: 0;
    background: #ffffff;
    /* Solid white for compatibility */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    max-height: 450px;
    overflow-y: auto;
    padding: 10px;
    z-index: 10000;
}

.ika-product-card {
    display: flex;
    align-items: center;
    padding: 14px;
    margin-bottom: 8px;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ika-product-card:hover {
    background: #ffffff;
    border-color: #f1f5f9;
    transform: translateX(5px);
}

.ika-img-container {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 18px;
    /* Standard spacing fallback for gap */
    background: #ffffff;
    flex-shrink: 0;
}

.ika-img-container img {
    width: 65px;
    height: 65px;
    object-fit: cover;
}

.ika-content {
    flex: 1;
}

.ika-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ika-description {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 8px 0;
    line-height: 1.4;
    max-height: 38px;
    /* Height-based truncation fallback */
    overflow: hidden;
}

.ika-meta {
    display: block;
    /* Flex gap fallback */
}

.ika-sku-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Skeleton Loading */
.ika-skeleton {
    padding: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.ika-skeleton-img {
    width: 65px;
    height: 65px;
    background: #e2e8f0;
    border-radius: 12px;
    margin-right: 18px;
}

.ika-skeleton-text {
    flex: 1;
}

.ika-skeleton-title {
    height: 16px;
    background: #e2e8f0;
    width: 70%;
    margin-bottom: 10px;
}

.ika-skeleton-meta {
    height: 12px;
    background: #e2e8f0;
    width: 40%;
}

.ika-shimmer {
    background: #f1f5f9;
    animation: ika-shimmer-anim 1.5s infinite;
}

@keyframes ika-shimmer-anim {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}