/* ==========================================================================
   Store Fast Search — v1.1.0
   Scoped entirely to .sfs-* — zero conflicts with Beaver Builder or WooCommerce
   ========================================================================== */

/* Outer wrapper — shortcode root */
.sfs-wrap {
    position: relative;
    width: 100%;
	min-width: 300px;
	width:100%;
    font-family: inherit;
    box-sizing: border-box;
}

/* Input row */
.sfs-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* Search icon */
.sfs-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999 !important;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

/* Input field */
.sfs-input {
    width: 100%;
    height: 44px;
    padding: 6px 35px !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.sfs-input:focus {
    border-color: #aaa;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.sfs-input::placeholder {
    color: #bbb;
}

/* Clear button */
.sfs-clear {
    position: absolute !important;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
    line-height: 1;
}

.sfs-clear:hover { color: #555; }

/* ==========================================================================
   Dropdown
   ========================================================================== */
.sfs-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 999999;
    overflow: hidden;
    animation: sfs-fade-in 0.12s ease;
}

.sfs-dropdown.is-open { display: block; }

@keyframes sfs-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Results list */
.sfs-results {
    list-style: none;
    margin: 0;
    padding: 6px 0;
	max-height: 400px;
    overflow-y: scroll;
}

.sfs-results li {
    margin: 0;
    padding: 0;
}

/* Individual result link */
.sfs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    outline: none;
    transition: background 0.1s ease;
    cursor: pointer;
}

.sfs-item:hover,
.sfs-item:focus {
    background: #f7f7f7;
}

/* Thumbnail */
.sfs-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f0f0f0;
    display: none;
}

/* Text meta */
.sfs-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.sfs-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a !important;
    /*white-space: nowrap;*/
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sfs-price {
    font-size: 13px;
    color: #1a1a1a !important;
    line-height: 1;
}

/* Sale price formatting */
.sfs-price del {
    color: #aaa;
    font-weight: 400;
    margin-right: 4px;
}

.sfs-price ins {
    color: #c0392b;
    font-weight: 600;
    text-decoration: none;
}

/* No results */
.sfs-none {
    padding: 18px 14px;
    font-size: 14px;
    color: #777;
    text-align: center;
}

/* Loading dots */
.sfs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 14px;
}

.sfs-loading span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    animation: sfs-pulse 1.1s ease-in-out infinite;
}

.sfs-loading span:nth-child(2) { animation-delay: 0.18s; }
.sfs-loading span:nth-child(3) { animation-delay: 0.36s; }

@keyframes sfs-pulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
    40%            { opacity: 1;   transform: scale(1);    }
}

/* Footer */
.sfs-footer {
    border-top: 1px solid #ebebeb;
    padding: 10px 14px;
    text-align: center;
}

.sfs-view-all {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
	background-color: #feb427;
    display: flex;
    padding: 10px;
    align-items: center;
    justify-content: center;
    color: black !important;
	border-radius:5px;
}

.sfs-view-all:hover,
.sfs-view-all:focus,
.sfs-view-all:active { 
	background-color:black !important;
	color: white !important; 
	text-decoration:none !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .sfs-wrap        { max-width: 100%; }
    .sfs-dropdown    { left: 0; right: 0; }
    .sfs-input       { height: 42px; font-size: 16px; } /* 16px prevents iOS zoom */
}
