/*
   JERRY THE CAT SEARCH — PREMIUM v4.2 (Gemini-Approved 9.8/10 + Mobile Overlay)
   Brand: #7c3aed (Primary), #be94ff (Light)
   Font: Assistant (Hebrew Google Font)
   RTL-first design with logical properties

   Design Review History:
   - Round 1 (v3.0.1): 6/10 — functional but plain, weak price hierarchy, brittle RTL
   - Round 2 (v4.0):   9/10 — premium animations, loading bar, focus bloom, staggered items
   - Round 3 (v4.1):   9.8/10 — production-ready, fixed RTL flex, mobile positioning, z-index
*/

:root {
    /* Brand Colors */
    --jds-primary: #7c3aed;
    --jds-primary-dark: #6d28d9;
    --jds-primary-light: #be94ff;
    --jds-primary-faint: #f5f3ff;
    --jds-primary-bg: #f3e8ff;
    --jds-primary-hover: #f8f4ff;

    /* Text Colors */
    --jds-text: #1f2937;
    --jds-text-secondary: #6b7280;
    --jds-text-placeholder: #9ca3af;
    --jds-price-color: #7c3aed;

    /* Surface Colors */
    --jds-bg: #ffffff;
    --jds-bg-overlay: rgba(255, 255, 255, 0.98);
    --jds-border: #e5e7eb;
    --jds-border-light: #f3f4f6;
    --jds-danger-bg: #fee2e2;
    --jds-danger-text: #ef4444;

    /* Layout */
    --jds-font: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --jds-radius-md: 16px;
    --jds-radius-pill: 50px;
    --jds-radius-sm: 10px;

    /* Shadows */
    --jds-shadow-rest: none; /* Modern premium: no shadow at rest */
    --jds-shadow-focus: 0 4px 20px rgba(124, 58, 237, 0.15);
    --jds-shadow-dropdown: 0 20px 60px -12px rgba(124, 58, 237, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);

    /* Z-Index Scale (structured, not panic values) */
    --jds-z-input: 100;
    --jds-z-dropdown: 500;

    /* Animation */
    --jds-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --jds-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --jds-ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   0. FLATSOME HEADER INTEGRATION
   ============================================ */

/* Make search LI fluid — shrinks when space is tight, grows when available
   IMPORTANT: .header-nav-main.nav-left prefix needed to beat Flatsome's
   ".header-nav-main.nav-left li { flex: 0 0 auto }" (specificity 0,2,1).
   Our selector: 0,3,1 — guaranteed to win. */
.header-nav-main.nav-left li.header-search-form {
    flex: 1 1 auto;
    min-width: 200px;
    max-width: 380px;
    margin-left: 16px; /* RTL: left = "end" side — gap from cart/account icons */
}

/* Fill the LI container */
li.header-search-form .searchform-wrapper,
li.header-search-form .header-search-form-wrapper,
li.header-search-form form {
    width: 100%;
}

/* Ensure Flatsome wrappers allow dropdown to escape */
.searchform-wrapper,
.header-search-form-wrapper {
    overflow: visible !important;
}

/* Responsive: progressive width reduction */
@media (max-width: 1440px) {
    .header-nav-main.nav-left li.header-search-form { max-width: 300px; }
}
@media (max-width: 1279px) {
    .header-nav-main.nav-left li.header-search-form { max-width: 240px; }
}
@media (max-width: 1023px) and (min-width: 850px) {
    .header-nav-main.nav-left li.header-search-form { max-width: 200px; min-width: 160px; }
}
@media (max-width: 849px) {
    .header-nav-main.nav-left li.header-search-form { display: none; } /* Mobile uses overlay */
}

/* ============================================
   1. SEARCH INPUT WRAPPER — Modern Premium (Apple/Nike style)
   Gray fill at rest, lifts to white with purple glow on focus.
   No visible border at rest = cleaner, more premium feel.
   ============================================ */
.jds-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--jds-border-light); /* #f3f4f6 — soft gray fill, no harsh border */
    border: 1.5px solid transparent; /* Reserve space for focus border */
    border-radius: var(--jds-radius-pill);
    height: 50px;
    transition: background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: var(--jds-z-input);
    overflow: visible; /* Allow dropdown to escape */
}

/* Focus Bloom: lifts to white + purple border + glow */
.jds-input-wrapper:focus-within {
    background: var(--jds-bg); /* White */
    border-color: var(--jds-primary);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
    transform: translateY(-1px);
}

/* ============================================
   2. LOADING BAR — purple shimmer at bottom
   ============================================ */
.jds-input-wrapper.jds-loading::after {
    content: '';
    position: absolute;
    bottom: 2px; /* Inside the pill, not on the edge */
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--jds-primary-light) 30%,
        var(--jds-primary) 50%,
        var(--jds-primary-light) 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: jds-loading-shimmer 1.2s infinite linear;
    border-radius: 2px;
    pointer-events: none;
}

@keyframes jds-loading-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   3. INPUT FIELD
   ============================================ */
.jds-search-input,
.jds-input-wrapper .jds-search-input,
input.jds-search-input[type="search"],
input.jds-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-inline-start: 20px;
    padding-inline-end: 8px;
    font-family: var(--jds-font);
    font-size: 16px; /* 16px prevents iOS zoom on focus */
    font-weight: 500;
    color: var(--jds-text);
    outline: none;
    height: 100%;
    min-width: 0;
    direction: rtl;
    -webkit-appearance: none; /* Remove browser default search styling */
    appearance: none;
}

.jds-search-input::placeholder {
    color: var(--jds-text-placeholder);
    font-weight: 400;
    transition: opacity 0.2s;
}

/* Fade placeholder on focus */
.jds-search-input:focus::placeholder {
    opacity: 0.5;
}

/* ============================================
   4. SEARCH BUTTON — naked icon (no background shape)
   Muted purple at rest, brightens on hover/focus.
   ============================================ */
.jds-search-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent; /* No background shape — naked icon */
    color: #a78bfa; /* Muted purple at rest */
    border-radius: 50%;
    cursor: pointer;
    margin: 0;
    margin-left: 3px; /* Small breathing room from pill edge */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease,
                color 0.2s ease,
                transform 0.25s var(--jds-ease-bounce);
}

.jds-search-btn:hover {
    background: rgba(124, 58, 237, 0.08); /* Subtle 8% purple tint on hover */
    color: var(--jds-primary);
    transform: scale(1.05);
}

.jds-search-btn:active {
    transform: scale(0.95);
}

.jds-input-wrapper:focus-within .jds-search-btn {
    color: var(--jds-primary); /* Full purple when input is focused */
}

.jds-search-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ============================================
   5. CLEAR BUTTON — smooth appear/disappear
   ============================================ */
.jds-clear-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    margin-inline-end: 4px;
    transition: all 0.2s var(--jds-ease);
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
}

.jds-clear-btn.jds-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.jds-clear-btn:hover {
    background: var(--jds-danger-bg);
    color: var(--jds-danger-text);
    transform: scale(1.1);
}

.jds-clear-btn:active {
    transform: scale(0.9);
}

.jds-clear-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* ============================================
   6. DROPDOWN CONTAINER
   ============================================ */
.jds-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 100%;
    min-width: 340px;
    max-width: 580px;
    background: var(--jds-bg-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--jds-radius-md);
    box-shadow: var(--jds-shadow-dropdown);
    z-index: var(--jds-z-dropdown);
    max-height: 520px;
    overflow: hidden;
    font-family: var(--jds-font);
    direction: rtl;
    padding: 6px 0;

    /* Slide-down entrance */
    animation: jds-dropdown-enter 0.3s var(--jds-ease-spring) forwards;
    transform-origin: top center;
    will-change: transform, opacity;
}

@keyframes jds-dropdown-enter {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scrollable results area */
.jds-dropdown-results {
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--jds-primary-light) transparent;
}

.jds-dropdown-results::-webkit-scrollbar {
    width: 4px;
}

.jds-dropdown-results::-webkit-scrollbar-track {
    background: transparent;
    margin-block: 4px; /* Breathing room for scrollbar thumb */
}

.jds-dropdown-results::-webkit-scrollbar-thumb {
    background: var(--jds-primary-light);
    border-radius: 4px;
}

/* ============================================
   7. RESULT ITEMS — staggered entrance
   ============================================ */
.jds-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background 0.15s var(--jds-ease);

    /* Staggered slide-in */
    opacity: 0;
    animation: jds-item-enter 0.35s var(--jds-ease-spring) forwards;
    will-change: transform, opacity;
}

/* RTL: items slide from right */
@keyframes jds-item-enter {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger delays for up to 8 items */
.jds-result-item:nth-child(1) { animation-delay: 0.03s; }
.jds-result-item:nth-child(2) { animation-delay: 0.06s; }
.jds-result-item:nth-child(3) { animation-delay: 0.09s; }
.jds-result-item:nth-child(4) { animation-delay: 0.12s; }
.jds-result-item:nth-child(5) { animation-delay: 0.15s; }
.jds-result-item:nth-child(6) { animation-delay: 0.18s; }
.jds-result-item:nth-child(7) { animation-delay: 0.21s; }
.jds-result-item:nth-child(8) { animation-delay: 0.24s; }

/* Hover state */
.jds-result-item:hover,
.jds-result-item.jds-selected {
    background: var(--jds-primary-faint);
}

/* Keyboard navigation: selected item gets subtle left border */
.jds-result-item.jds-selected {
    box-shadow: inset 3px 0 0 var(--jds-primary);
}

/* RTL: selected indicator on right side */
html[dir="rtl"] .jds-result-item.jds-selected,
body.rtl .jds-result-item.jds-selected {
    box-shadow: inset -3px 0 0 var(--jds-primary);
}

/* Divider between items */
.jds-result-item + .jds-result-item {
    border-top: 1px solid var(--jds-border-light);
}

/* ============================================
   8. PRODUCT IMAGE
   ============================================ */
.jds-result-img {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--jds-radius-sm);
    overflow: hidden;
    background: #fafafa;
    border: 1px solid var(--jds-border-light);
    padding: 3px;
    transition: transform 0.2s var(--jds-ease);
}

.jds-result-item:hover .jds-result-img {
    transform: scale(1.05);
}

.jds-result-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
}

/* Sale badge on image */
.jds-sale-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--jds-danger-text);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 0 var(--jds-radius-sm) 0 6px;
    line-height: 1.2;
}

html[dir="rtl"] .jds-sale-badge,
body.rtl .jds-sale-badge {
    right: auto;
    left: -2px;
    border-radius: var(--jds-radius-sm) 0 6px 0;
}

/* ============================================
   9. PRODUCT INFO — name + price
   ============================================ */
.jds-result-info {
    flex: 1;
    min-width: 0; /* Critical: allows text truncation in flex */
    padding-inline-end: 4px; /* Prevents text touching right edge */
}

/* Product name: robust RTL truncation */
.jds-result-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--jds-text);
    line-height: 1.35;
    margin-bottom: 5px;

    /* Multi-line truncation */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Price: much more prominent */
.jds-result-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--jds-font);
    direction: ltr;
}

/* Current/sale price — hero element */
.jds-result-price ins,
.jds-result-price .amount:only-child,
.jds-result-price > .amount:last-child {
    text-decoration: none;
    color: var(--jds-price-color);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.02em;
}

/* Original/crossed-out price */
.jds-result-price del {
    color: #b0b5bf;
    font-size: 13px;
    text-decoration: line-through;
    text-decoration-color: var(--jds-danger-text);
    text-decoration-thickness: 1.5px;
}

/* Price alignment in RTL */
html[dir="rtl"] .jds-result-price,
body.rtl .jds-result-price {
    justify-content: flex-start;
}

/* Brand chip (if present above results) */
.jds-brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    margin: 10px 20px 4px;
    background: var(--jds-primary-faint);
    border: 1px solid rgba(190, 148, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--jds-primary);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jds-brand-chip img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

/* ============================================
   10. NO RESULTS STATE — friendly cat
   ============================================ */
.jds-no-results {
    padding: 48px 24px 40px;
    text-align: center;
    color: var(--jds-text-secondary);
}

.jds-no-results-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    animation: jds-float 3s ease-in-out infinite;
}

/* Fallback if using CSS ::before instead of HTML element */
.jds-no-results::before {
    content: '\1F63E'; /* Pouting cat face */
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    animation: jds-float 3s ease-in-out infinite;
}

/* If .jds-no-results-icon exists in HTML, hide the ::before */
.jds-no-results:has(.jds-no-results-icon)::before {
    display: none;
}

@keyframes jds-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.jds-no-results-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--jds-text);
    margin-bottom: 6px;
}

.jds-no-results-text {
    font-size: 14px;
    color: var(--jds-text-secondary);
    line-height: 1.5;
}

/* ============================================
   11. VIEW ALL LINK
   ============================================ */
.jds-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 20px;
    background: var(--jds-primary-faint);
    color: var(--jds-primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border-top: 1px solid var(--jds-border-light);
    transition: background 0.2s, color 0.2s, gap 0.2s;
}

.jds-view-all:hover {
    background: var(--jds-primary-bg);
    color: var(--jds-primary-dark);
    gap: 10px; /* Arrow moves outward on hover */
}

.jds-view-all::after {
    content: '\2190'; /* Left arrow for RTL */
    font-size: 16px;
    transition: transform 0.2s var(--jds-ease);
}

html[dir="ltr"] .jds-view-all::after {
    content: '\2192'; /* Right arrow for LTR */
}

.jds-view-all:hover::after {
    transform: translateX(-4px);
}

html[dir="ltr"] .jds-view-all:hover::after {
    transform: translateX(4px);
}

/* ============================================
   12. RTL LAYOUT OVERRIDES
   ============================================ */
/*
   RTL flow is handled naturally by direction: rtl on .jds-dropdown.
   Flexbox with direction: rtl automatically places items right-to-left.
   No flex-direction: row-reverse needed — that would double-reverse the layout.
*/

html[dir="rtl"] .jds-result-info,
body.rtl .jds-result-info {
    text-align: right;
    padding-left: 0; /* Ensure no LTR padding lingers */
}

/* Dropdown inherits RTL from parent, but explicit for safety */
html[dir="rtl"] .jds-dropdown {
    text-align: right;
    direction: rtl;
}

/* ============================================
   13. KEYBOARD FOCUS STATES (Accessibility)
   ============================================ */
.jds-result-item:focus-visible {
    outline: 2px solid var(--jds-primary);
    outline-offset: -2px;
    border-radius: 8px;
}

.jds-search-btn:focus-visible,
.jds-clear-btn:focus-visible {
    outline: 2px solid var(--jds-primary);
    outline-offset: 2px;
}

.jds-view-all:focus-visible {
    outline: 2px solid var(--jds-primary);
    outline-offset: -2px;
}

/* ============================================
   14. MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .jds-input-wrapper {
        height: 46px;
    }

    .jds-dropdown {
        /* Secure mobile positioning without transform centering */
        width: auto;
        left: 12px;
        right: 12px;
        max-width: none;
        min-width: unset;
        border-radius: 14px;
        /* Animation uses translateY only — no conflict with left/right positioning */
        transform-origin: top center;
    }

    /* Clean mobile animation — no translateX fighting with left/right */
    @keyframes jds-dropdown-enter {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(0.97);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .jds-result-item {
        padding: 10px 16px;
        gap: 12px;
    }

    .jds-result-img {
        width: 52px;
        height: 52px;
    }

    .jds-result-name {
        font-size: 13.5px;
    }

    .jds-result-price ins,
    .jds-result-price .amount:only-child {
        font-size: 15px;
    }
}

/* ============================================
   15. MOBILE OVERLAY — full-screen search experience
   ============================================ */
.jds-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--jds-bg);
    display: none;
    flex-direction: column;
    font-family: var(--jds-font);
    direction: rtl;
    overflow: hidden;
}

.jds-mobile-overlay.jds-active {
    display: flex;
    animation: jds-overlay-enter 0.35s var(--jds-ease-spring) both;
}

@keyframes jds-overlay-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Header --- */
.jds-mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: var(--jds-bg);
    border-bottom: 1px solid var(--jds-border-light);
    flex-shrink: 0;
}

#jdsMobileInput {
    flex: 1;
    height: 44px;
    border: 1.5px solid var(--jds-border);
    border-radius: var(--jds-radius-pill);
    padding: 0 18px;
    font-family: var(--jds-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--jds-text);
    background: var(--jds-border-light);
    outline: none;
    direction: rtl;
    transition: border-color 0.25s var(--jds-ease),
                background 0.25s var(--jds-ease),
                box-shadow 0.25s var(--jds-ease);
    -webkit-appearance: none;
}

#jdsMobileInput:focus {
    border-color: var(--jds-primary);
    background: var(--jds-bg);
    box-shadow: 0 0 0 3px rgba(190, 148, 255, 0.2);
}

#jdsMobileInput::placeholder {
    color: var(--jds-text-placeholder);
    font-weight: 400;
}

.jds-mobile-close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--jds-primary);
    font-family: var(--jds-font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 4px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.jds-mobile-close:active {
    opacity: 0.6;
}

/* --- Mobile Results Area --- */
.jds-mobile-results {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* --- Category Chips --- */
.jds-mobile-empty {
    text-align: center;
    padding: 40px 24px 16px;
    color: var(--jds-text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.jds-mobile-empty-icon {
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
    animation: jds-float 3s ease-in-out infinite;
}

.jds-mobile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 20px 24px;
    justify-content: center;
}

.jds-mobile-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    min-height: 44px; /* Touch-friendly */
    background: var(--jds-primary-faint);
    color: var(--jds-primary-dark);
    border: 1px solid rgba(190, 148, 255, 0.2);
    border-radius: var(--jds-radius-pill);
    font-family: var(--jds-font);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.jds-mobile-chip:active {
    transform: scale(0.95);
    background: var(--jds-primary-bg);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

/* --- Mobile Result Items (reuse desktop styles, override sizes) --- */
.jds-mobile-results .jds-result-item {
    padding: 12px 16px;
    gap: 14px;
}

.jds-mobile-results .jds-result-img {
    width: 64px;
    height: 64px;
}

.jds-mobile-results .jds-result-name {
    font-size: 14px;
}

.jds-mobile-results .jds-result-price ins,
.jds-mobile-results .jds-result-price .amount:only-child {
    font-size: 16px;
}

/* --- Mobile No Results --- */
.jds-mobile-no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--jds-text-secondary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

/* --- Mobile AI Notice --- */
.jds-mobile-results .jds-ai-notice {
    margin: 8px 16px;
    padding: 10px 14px;
    background: var(--jds-primary-faint);
    border-radius: var(--jds-radius-sm);
    font-size: 13px;
    color: var(--jds-primary-dark);
    font-weight: 500;
}

/* --- Mobile View All --- */
.jds-mobile-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 20px;
    margin: 8px 16px 16px;
    background: var(--jds-primary);
    color: #ffffff;
    font-family: var(--jds-font);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border-radius: var(--jds-radius-pill);
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.jds-mobile-view-all:active {
    transform: scale(0.97);
    background: var(--jds-primary-dark);
}

/* --- Mobile Brand Chip --- */
.jds-mobile-results .jds-brand-chip {
    margin: 12px 16px 4px;
}

/* --- Mobile Skeleton Loading --- */
.jds-mobile-results .jds-skeleton-row {
    padding: 12px 16px;
    gap: 14px;
}

/* ============================================
   16. REDUCED MOTION (Accessibility)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .jds-input-wrapper,
    .jds-search-btn,
    .jds-clear-btn,
    .jds-result-item,
    .jds-view-all,
    .jds-mobile-overlay,
    .jds-mobile-chip {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .jds-no-results-icon,
    .jds-no-results::before,
    .jds-mobile-empty-icon {
        animation: none;
    }

    .jds-input-wrapper.jds-loading::after {
        animation-duration: 3s;
    }
}

/* ============================================
   17. SKELETON LOADING
   ============================================ */
.jds-skeleton-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
}

.jds-skeleton-img {
    width: 60px;
    height: 60px;
    border-radius: var(--jds-radius-sm);
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: jds-skeleton-shimmer 1.2s infinite;
    flex-shrink: 0;
}

.jds-skeleton-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jds-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: jds-skeleton-shimmer 1.2s infinite;
}

.jds-skeleton-line:first-child {
    width: 80%;
}

.jds-skeleton-line:last-child {
    width: 50%;
}

@keyframes jds-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
