/**
 * Frontend CSS for WooCommerce Elasticsearch
 */

/* Font and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.woo-es-search-container * {
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* Search Container */
.woo-es-search-container {
    max-width: 100%;
    margin: 0 auto;
}

.woo-es-search-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Search Form */

.woo-es-search-input-wrapper {
    position: relative;
    display: flex;
}

/* Ensure mobile search wrapper has relative positioning */
.woo-es-mobile .woo-es-search-input-wrapper {
    position: relative;
}

.woo-es-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.woo-es-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.woo-es-search-button {
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.woo-es-search-button:hover {
    background: #005a87;
}

.woo-es-search-icon {
    font-size: 18px;
}

/* Filters */
.woo-es-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.woo-es-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.woo-es-filter:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Loading */
.woo-es-loading {
    text-align: center;
    padding: 10px;
    color: #666;
    position: absolute;
    right: 10px;
    top: 0;
    height: 50px;
    display: flex
;
    justify-content: center;
    align-items: center;
}
.woo-es-loading span {
    display: none;
}
.woo-es-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #555;
    border-radius: 50%;
    animation: woo-es-spin 1s linear infinite;
}

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

/* Search Results */

.woo-es-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* AWS Result Item Styles (Compact 100px Layout) */
.aws_result_item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #eee;
    background-color: transparent;
    transform: translateY(0);
    box-shadow: none;
    transition: all 0.3s ease;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    height: 100px;
    min-height: 100px;
}

.aws_result_item:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aws_result_link {
    display: flex;
    width: 100%;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.aws_result_link_top {
    text-decoration: none;
    color: #333;
    display: inline;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    border: none;
}

.aws_result_link_top:hover {
    color: #007cba;
}

.aws_result_image_container {
    margin-right: 15px;
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aws_result_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    height: 100%;
    min-height: 84px;
}

.aws_result_image {
    display: block;
}

.aws_result_image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.aws_result_header {
    margin: 0;
    flex-shrink: 0;
}

.aws_result_title {
    font-weight: bold;
    font-size: 14px;
    line-height: 1.3;
    color: #333;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
        font-weight: 400 !important;
    margin-bottom: 3px !important;
    color: #21759b;
    font-size: 12px !important;
    line-height: 16px !important;
}

.aws_result_meta {
    margin: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.aws_result_price {
    font-weight: bold;
    color: #007cba;
    font-size: 14px;
}

.aws_result_stock {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.aws_result_stock.in {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.aws_result_stock.out {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.aws_result_sku_container {
    margin: 0;
    flex-shrink: 0;
}

.aws_result_sku {
    font-size: 11px;
    color: #666;
    margin: 0;
    padding: 0;
}

.aws_result_sku strong {
    color: #333;
    font-weight: 600;
}

.aws_result_categories_container {
    margin: 0;
    flex-shrink: 0;
}

.aws_result_categories {
    font-size: 11px;
    color: #666;
    margin: 0;
    padding: 0;
}

.aws_result_excerpt_container {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

.aws_result_excerpt {
    color: #666;
    font-size: 12px;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: #222 !important;
}

/* Pagination */
.woo-es-pagination {
    margin-top: 30px;
    text-align: center;
}

.woo-es-pagination-links {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.woo-es-page-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.woo-es-page-link:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.woo-es-page-link.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woo-es-search-container {
        padding: 0 10px;
    }
    
    .woo-es-search-input-wrapper {
        flex-direction: column;
    }
    
    .woo-es-search-input {
        border-radius: 6px;
        margin-bottom: 10px;
    }
    
    .woo-es-search-button {
        border-radius: 6px;
    }
    
    .woo-es-filters {
        flex-direction: column;
    }
    
    .woo-es-filter {
        min-width: auto;
        width: 100%;
    }
    
    .aws_result_content {
        flex-direction: column;
        gap: 10px;
    }
    
    /*.aws_result_image {
        width: 100%;
        height: 200px;
    }*/
    
    .woo-es-pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Shortcode specific styles */
.woo-es-search-container .woo-es-search-widget {
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Widget specific styles */
.widget .woo-es-search-widget {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.widget .woo-es-search-input {
    width: 100%;
    margin-bottom: 10px;
}

.widget .woo-es-filters {
    margin-bottom: 15px;
}

/* No results message */
.woo-es-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Error message */
.woo-es-error {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* Search Field (Always Visible) */
.woo-es-search-field {
    position: relative;
    display: inline-block;
    width: 100%;
}

.woo-es-search-container .woo-es-search-input-main {
    width: 100%;
    -webkit-appearance: textfield;
    outline-offset: -2px;
    border: 1px solid #000000c7;
    border-radius: 3px;
    padding: .5rem 1rem;
    transition: all .3s;
    background: none !important;
    font-family: 'Lato' !important;
    font-weight: 400;
    height: 43px;
    min-height: initial;
    line-height: normal;
    font-size: 18px !important;
    color: #000 !important;
    max-width: 645px;
    margin: 0px 0 0 auto;
    display: block;
    position: relative;
    top: -7px;
    font-style: normal !important;
    text-transform: capitalize;
}

.woo-es-search-container .woo-es-search-input-main::-webkit-input-placeholder { 
    color: #000 !important;
    font-family: 'Lato' !important;
    font-style: normal !important;
}
.woo-es-search-container .woo-es-search-input-main::-moz-placeholder { 
    color: #000 !important;
    font-family: 'Lato' !important;
    font-style: normal !important;
}
.woo-es-search-container .woo-es-search-input-main:-ms-input-placeholder {
    color: #000 !important;
    font-family: 'Lato' !important;
    font-style: normal !important;
}
.woo-es-search-container .woo-es-search-input-main:-moz-placeholder { 
    color: #000 !important;
    font-family: 'Lato' !important;
    font-style: normal !important;
}

/*.woo-es-search-input-main:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}*/

.woo-es-search-input-main::placeholder {
    color: #999;
    font-style: italic;
}

.woo-es-search-button-main {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    display: none !important;
}

.woo-es-search-button-main:hover {
    background: #005a87;
    transform: translateY(-50%) scale(1.05);
}

/* Search Icon Styling */
.woo-es-search-icon {
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
    width: 16px;
    height: 16px;
    text-align: center;
}

/* SVG fallback for browsers that don't support emoji */
@supports not (content: "🔍") {
    .woo-es-search-icon {
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>') no-repeat center;
        background-size: 16px 16px;
        text-indent: -9999px;
        overflow: hidden;
    }
    
    .woo-es-search-icon:before {
        display: none;
    }
}

/* Search Trigger Button (Alternative) */
.woo-es-search-trigger {
    display: inline-block;
}

.woo-es-search-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
    font-family: 'Arial', sans-serif;
}

.woo-es-search-trigger-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.woo-es-search-trigger-btn .woo-es-search-icon {
    font-size: 18px;
    font-family: 'Arial', sans-serif;
}

.woo-es-search-trigger-btn .woo-es-search-text {
    font-size: 14px;
    font-family: 'Arial', sans-serif;
}

/* Modal Styles */
.woo-es-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.woo-es-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.woo-es-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0b0b;
    opacity: 0.8;
    /*backdrop-filter: blur(5px);*/
}

.woo-es-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    /* max-width: 800px; */
    max-height: 90vh;
    /* background: white; */
    /* border-radius: 12px; */
    /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); */
    /*overflow: hidden;*/
    display: flex
    ;
    flex-direction: column;
}

.woo-es-modal-close {
   width: 44px;
    height: 44px;
    line-height: 44px;
    position: absolute;
    right: 0;
    top: 0;
    text-decoration: none;
    text-align: center;
    opacity: 0.65;
    padding: 0 0 18px 10px;
    color: #FFF;
    font-style: normal;
    font-size: 28px;
    font-family: Arial, Baskerville, monospace;
        overflow: visible;
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;
    display: block;
    outline: none;
    padding: 0;
    z-index: 1046;
    box-shadow: none;
    touch-action: manipulation;
    font-weight: 100;
    position: absolute;
    top: -70px;
    right: 45px;
    font-size: 60px;
    cursor: pointer;
    color: white;
}
.woo-es-modal-close:hover {
    color: #fff;
    background-color: #1E73BE;
    opacity: 1;
}
.woo-es-modal-close:focus {
    outline: none;
    background: transparent;
}

.woo-es-modal-body {
    flex: 1;
    overflow-y: auto;
        width: 80%;
        margin: 0 auto;
        position: relative;
}

/* Auto-complete Popup */
.woo-es-autocomplete-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    /*border-radius: 0 0 25px 25px;*/
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 2px;
}

/*.woo-es-search-field .woo-es-autocomplete-popup {
    border-radius: 0 0 25px 25px;
}*/

.woo-es-suggestions {
    padding: 0;
    margin: 0;
}

.woo-es-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.woo-es-suggestion-item:last-child {
    border-bottom: none;
}

.woo-es-suggestion-item:hover,
.woo-es-suggestion-item.highlighted {
    background: #f8f9fa;
}

.woo-es-suggestion-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Body scroll lock when modal is open */
body.woo-es-modal-open {
    overflow: hidden;
}

/* Enhanced Search Input in Modal */
.woo-es-modal-body .woo-es-search-input-wrapper {
    position: relative;
}

.woo-es-modal-body .woo-es-search-input {
    outline-offset: -2px;
    transition: all .3s;
    border-bottom: 1px solid #afa0a0 !important;
    font-size: 28px !important;
    width: 100% !important;
    font-family: 'Lato';
    font-weight: 400;
    background: none !important;
    -moz-hyphens: manual;
    -webkit-hyphens: manual;
    hyphens: manual;
    border-radius: 0 !important;
    position: relative;
    z-index: 2;
    -webkit-appearance: none;
    height: 100%;
    margin: 0 !important;
    border: 1px solid #d8d8d8;
    outline: 0;
    padding: 6px;
    line-height: 30px;
    display: block;
    max-width: 100%;
    padding-right: 40px;
    border-width: 3px;
    border-color: #ffffff !important;
    color: #fff !important;
}

.woo-es-modal-body .woo-es-search-input::-webkit-input-placeholder {
    color: #fff !important;
}
.woo-es-modal-body .woo-es-search-input::-moz-placeholder {
    color: #fff !important;
}
.woo-es-modal-body .woo-es-search-input:-ms-input-placeholder {
    color: #fff !important;
}
.woo-es-modal-body .woo-es-search-input:-moz-placeholder {
    color: #fff !important;
}
.woo-es-modal-body .woo-es-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.woo-es-modal-body .woo-es-search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    border-radius: 6px;
    display: none;
}

/* Modal Results */
.woo-es-modal-body .woo-es-results-container {
    overflow-y: auto;
     max-height: 400px;
}

.woo-es-modal-body .woo-es-results-container::-webkit-scrollbar-track {
    -webkit-box-shadow: none;
    background-color: #ededed
}

.woo-es-modal-body .woo-es-results-container::-webkit-scrollbar {
    width: 7px;
    background-color: #ededed
}

.woo-es-modal-body .woo-es-results-container::-webkit-scrollbar-thumb {
    background-color: #d8d8d8
}
.woo-es-modal-body .woo-es-results>ul {
    border: 1px solid #ccc;
    background: #fff;
}
.woo-es-modal-body .aws_result_item {
    margin-bottom: 0px;
    border: 1px solid transparent !important;
    border-radius: 0px;
    border-bottom: 1px solid #ccc !important;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff !important;
}
.woo-es-modal-body .aws_result_item:last-child {
    border-bottom: 0 !important;
}


.woo-es-modal-body .aws_result_item:hover {
    box-shadow: none !important;
    transform: none !important;
    background: #f5f5f5 !important;
}

.woo-es-modal-body .aws_result_content {
    padding: 20px;
}

.woo-es-modal-body .aws_result_image {
    width: 100px;
    height: 100px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .woo-es-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .woo-es-modal-header {
        padding: 15px 20px;
    }
    
    .woo-es-modal-header h3 {
        font-size: 20px;
    }
    
    .woo-es-modal-body {
        padding: 20px;
    }
    
    .woo-es-modal-body .woo-es-search-input {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .woo-es-modal-body .aws_result_content {
        flex-direction: column;
        gap: 15px;
    }
    
    .woo-es-modal-body .aws_result_image {
        width: 100%;
        height: 200px;
    }
}

/* Animation for modal */
.woo-es-search-modal.active .woo-es-modal-content {
    animation: woo-es-modal-slide-in 0.3s ease-out;
}

@keyframes woo-es-modal-slide-in {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Animation for autocomplete popup */
.woo-es-autocomplete-popup {
    animation: woo-es-popup-fade-in 0.2s ease-out;
}

@keyframes woo-es-popup-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Styles */
.woo-es-index-controls {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.woo-es-progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.woo-es-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #005a87);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.woo-es-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: woo-es-progress-shine 2s infinite;
}

@keyframes woo-es-progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.woo-es-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-weight: 500;
}

.woo-es-progress-details {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.woo-es-stats-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.woo-es-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.woo-es-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.woo-es-stat-label {
    font-weight: 500;
    color: #333;
}

.woo-es-stat-value {
    font-weight: 600;
    color: #007cba;
    font-size: 18px;
}

.woo-es-overall-progress {
    margin-top: 15px;
}

.woo-es-show-more-container {
    text-align: center;
    /*margin: 30px 0;*/
    padding: 20px;
    background: #fff;
    border-radius: 0px;
    border: 1px solid #ccc;
    border-top: 0;
}

.woo-es-show-more-info {
    margin-bottom: 15px;
}

.woo-es-showing {
    color: #666;
    font-size: 14px;
}

.woo-es-show-more-btn {
    display: inline-flex
;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1E73BF;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 10px !important;
    line-height: normal;
}

.woo-es-show-more-btn:hover {
    background: #000;
    color: white;
    text-decoration: none;
}

.woo-es-show-more-text {
    font-size: 14px;
}

.woo-es-show-more-count {
    font-size: 14px;
    opacity: 0.9;
}

.woo-es-show-more-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.woo-es-show-more-btn:hover .woo-es-show-more-icon {
    transform: translateX(3px);
}

/* Status Messages */
.woo-es-index-status.success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: 10px;
}

.woo-es-index-status.error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: 10px;
}

.woo-es-connection-status.success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: 10px;
}

.woo-es-connection-status.error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: 10px;
}

/* Mobile-specific styles */
.woo-es-mobile .woo-es-search-widget {
    padding: 15px;
    border-radius: 6px;
}

.woo-es-mobile .woo-es-search-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 16px;
}

.woo-es-mobile .woo-es-search-button {
    padding: 14px 20px;
}

/* Mobile autocomplete popup styling */
.woo-es-mobile .woo-es-autocomplete-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.woo-es-mobile .woo-es-autocomplete-popup .woo-es-suggestions {
    max-height: 350px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
}

/* Mobile autocomplete popup items */
.woo-es-mobile .woo-es-autocomplete-popup .aws_result_item {
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    display: block;
    text-decoration: none;
    color: inherit;
}

.woo-es-mobile .woo-es-autocomplete-popup .aws_result_item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.woo-es-mobile .aws_result_item {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.woo-es-mobile .aws_result_item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.woo-es-mobile .aws_result_image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.woo-es-mobile .aws_result_image_container {
    margin-right: 12px;
}

.woo-es-mobile .aws_result_title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.woo-es-mobile .aws_result_price {
    font-size: 16px;
    font-weight: 600;
    color: #e74c3c;
}

.woo-es-mobile .aws_result_sku {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.woo-es-mobile .aws_result_categories {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.woo-es-mobile .woo-es-pagination {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.woo-es-mobile .woo-es-pagination a {
    padding: 8px 12px;
    font-size: 14px;
}

/* Mobile autocomplete popup loading and pagination */
.woo-es-mobile .woo-es-autocomplete-popup .woo-es-loading {
    text-align: center;
    padding: 15px;
}

.woo-es-mobile .woo-es-autocomplete-popup .woo-es-loading-spinner {
    width: 20px;
    height: 20px;
    margin: 0 auto 8px;
}

.woo-es-mobile .woo-es-autocomplete-popup .woo-es-pagination {
    margin: 0;
    padding: 10px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.woo-es-mobile .woo-es-autocomplete-popup .woo-es-pagination a {
    padding: 6px 10px;
    font-size: 13px;
    margin: 0 2px;
}

.woo-es-mobile .woo-es-autocomplete-popup .woo-es-no-results {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 14px;
}

/* Mobile loading spinner */
.woo-es-mobile .woo-es-loading {
    text-align: center;
    padding: 20px;
}

.woo-es-mobile .woo-es-loading-spinner {
    width: 24px;
    height: 24px;
    margin: 0 auto 10px;
}

/* Mobile no results */
.woo-es-mobile .woo-es-no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}



/* Responsive adjustments */

@media (max-width: 991px) {
    .woo-es-search-modal {
        display: none;
    }
    .woo-es-search-container .woo-es-search-input-main {
        background: none !important;
        color: #fff !important;
        border-bottom: 1px solid #afa0a0 !important;
        width: 100% !important;
        font-weight: 400;
        font-size: 18px !important;
        border-radius: 0 !important;
        max-width: 100%;
        padding: 6px;
        line-height: 28px;
        display: block;
        position: relative;
        z-index: 2;
        -webkit-appearance: none;
        height: 100%;
        margin: 0 !important;
        border: 1px solid #d8d8d8;
        outline: 0;
        padding-right: 40px;
        border-width: 3px;
        border-color: #000000c7 !important;
        top: 0;
        height: auto;
    }
    .woo-es-autocomplete-popup ul {
    border: 1px solid #ccc;
    background: #fff;
    list-style: none;
    padding: 0;
    margin: 0;
}
.woo-es-autocomplete-popup {
    border-radius: 0;
}
.aws_result_image_container {
    margin-right: 15px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex
;
    align-items: center;
    justify-content: center;
}
.aws_result_image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.aws_result_item {
     height: unset !important; 
     min-height: unset !important; 
    padding: 10px !important;
}
.aws_result_item:hover {
    background-color: #f8f9fa !important;
     transform: translateY(0px)!important; 
     box-shadow: none !important; 
}
}

@media (max-width: 768px) {
    .woo-es-mobile .woo-es-search-widget {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}
@media (max-width: 575px) {
    .woo-es-autocomplete-popup {
    min-width: 300px;
}

}
