:root {
    /* Trigger Button */
    --srch-btn-bg: #4a4e69;
    --srch-btn-bg-hover: #3b3f58;
    --srch-btn-txt: #fff;
    
    /* Panel */
    --srch-overlay-bg: rgba(0, 0, 0, 0.5);
    --srch-panel-bg: #fff;
    --srch-panel-shadow: rgba(0, 0, 0, 0.15);
    
    /* Header */
    --srch-header-bg: #ebe6e3;
    --srch-header-border: #ebe6e3;
    --srch-header-txt: #333;
    --srch-close-hover-bg: rgba(0, 0, 0, 0.05);
    --srch-close-icon: #4a4e69;
    
    /* Search Input */
    --srch-input-border: #ddd;
    --srch-input-border-focus: #4a4e69;
    --srch-input-txt: #333;
    --srch-icon-clr: #999;
    
    /* Results */
    --srch-scrollbar-track: #f1f1f1;
    --srch-scrollbar-thumb: #888;
    --srch-scrollbar-thumb-hover: #555;
    
    /* Loading */
    --srch-loading-txt: #666;
    --srch-loading-spinner-bg: #f3f3f3;
    --srch-loading-spinner-clr: #4a4e69;
    
    /* Product Item */
    --srch-product-border: #e0e0e0;
    --srch-product-border-hover: #4a4e69;
    --srch-product-bg: #fff;
    --srch-product-img-bg: #f5f5f5;
    --srch-product-shadow-hover: rgba(34, 113, 177, 0.1);
    
    /* Product Text */
    --srch-product-title: #4a4e69;
    --srch-product-price: #4a4e69;
    --srch-product-price-old: #999;
    
    /* No Results */
    --srch-no-results-txt: #4a4e69;
}

/* Trigger Button */
.wps-trigger-wrapper {
    display: inline-block;
}

.wps-trigger-btn {
    background: var(--srch-btn-bg);
    color: var(--srch-btn-txt)!important;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wps-trigger-btn:hover {
    background: var(--srch-btn-bg-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover {
    outline: #EE7B30;
}   
.wps-trigger-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Panel Overlay */
.wps-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.wps-panel.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

.wps-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--srch-overlay-bg);
    cursor: pointer;
}

/* Panel Content */
.wps-panel-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 450px;
    background: var(--srch-panel-bg);
    box-shadow: -2px 0 20px var(--srch-panel-shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wps-panel.active .wps-panel-content {
    transform: translateX(0);
}

/* Header */
.wps-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--srch-header-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--srch-header-bg);
}

.wps-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--srch-header-txt);
    font-family: "Aboreto", sans-serif;
}

.wps-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.wps-close-btn:hover {
    background: var(--srch-close-hover-bg);
}

.wps-close-btn .dashicons {
    font-size: 38px;
    width: 38px;
    height: 38px;
    color: var(--srch-close-icon);
}

/* Search */
.wps-search-wrapper {
    padding: 20px;
    border-bottom: 1px solid var(--srch-header-border);
    position: relative;
}

.wps-search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid var(--srch-input-border);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
    color: var(--srch-input-txt);
}

.wps-search-input:focus {
    outline: none;
    border-color: var(--srch-input-border-focus);
    box-shadow: 0 0 0 1px var(--srch-input-border-focus);
}

.wps-search-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--srch-icon-clr);
    pointer-events: none;
}

/* Results */
.wps-results {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.wps-results::-webkit-scrollbar {
    width: 8px;
}

.wps-results::-webkit-scrollbar-track {
    background: var(--srch-scrollbar-track);
}

.wps-results::-webkit-scrollbar-thumb {
    background: var(--srch-scrollbar-thumb);
    border-radius: 4px;
}

.wps-results::-webkit-scrollbar-thumb:hover {
    background: var(--srch-scrollbar-thumb-hover);
}

/* Loading State */
.wps-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--srch-loading-txt);
    font-size: 15px;
}

.wps-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--srch-loading-spinner-bg);
    border-top: 2px solid var(--srch-loading-spinner-clr);
    border-radius: 50%;
    animation: wps-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes wps-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Item */
.wps-product-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--srch-product-border);
    border-radius: 8px;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: var(--srch-product-bg);
}

.wps-product-item:hover {
    border-color: var(--srch-product-border-hover);
    box-shadow: 0 2px 8px var(--srch-product-shadow-hover);
    transform: translateY(-2px);
}

.wps-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--srch-product-img-bg);
}

.wps-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wps-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wps-product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--srch-product-title)!important;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.wps-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--srch-product-price);
}

.wps-product-price del {
    color: var(--srch-product-price-old);
    font-weight: 400;
    font-size: 14px;
    margin-right: 8px;
}

.wps-product-price ins {
    text-decoration: none;
}

/* No Results */
.wps-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--srch-no-results-txt);
}

.wps-no-results .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Load More */
.wps-load-more {
    text-align: center;
    padding: 20px;
    color: var(--srch-loading-txt);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .wps-panel-content {
        max-width: 100%;
    }
    
    .wps-product-item {
        gap: 12px;
        padding: 12px;
    }
    
    .wps-product-image {
        width: 70px;
        height: 70px;
    }
    
    .wps-product-title {
        font-size: 14px;
    }
    
    .wps-product-price {
        font-size: 16px;
    }
}
