/* ================================
   SEARCH RESULTS PAGE (Shop Layout Adaptation)
   ================================ */

.search-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Ensure navbar doesn't cover content */
.search-page-wrapper {
    padding-top: 80px;
    /* Reduced from 100px */
    min-height: 60vh;
}

/* Full Width Layout */
.search-container-full {
    width: 100%;
    margin-top: 1rem;
}

.products-section.full-width {
    width: 100%;
}

/* Compact Search Header */
.search-page-wrapper .woocommerce-products-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-page-wrapper .page-title {
    font-size: 1.5rem;
    /* Reduced size */
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

.search-page-wrapper .woocommerce-result-count {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .search-page-wrapper {
        padding-top: 70px;
    }

    .search-page-wrapper .woocommerce-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .search-page-wrapper .page-title {
        font-size: 1.25rem;
    }
}

/* Non-product Result Card */
.content-card-simple {
    background: #fff;
    border-radius: 8px;
    /* Match standard radius */
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.content-card-simple:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.content-card-simple .product-image-wrapper.placeholder {
    aspect-ratio: 1;
    /* Match product image aspect ratio */
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    position: relative;
    overflow: hidden;
}

.placeholder-icon i {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.content-card-simple .woocommerce-loop-product__title {
    padding: 1rem 1rem 0.5rem;
    font-size: 1rem;
    margin: 0;
}

.content-card-simple .price {
    display: block;
    padding: 0 1rem 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* No Results Specifics */
.search-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.no-results-icon {
    margin-bottom: 1.5rem;
}

.no-results-icon i {
    width: 64px;
    height: 64px;
    color: #e5e5e5;
}

.no-results-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.no-results-text {
    color: #666;
    margin-bottom: 2rem;
}

.no-results-suggestions h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.suggestion-tag {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 20px;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.suggestion-tag:hover {
    background: #e5e7eb;
    color: #111;
}

/* ================================
   LIVE SEARCH DROPDOWN
   ================================ */

.search-bar {
    position: relative;
}

.live-search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    /* Ensure text alignment is left */
}

.live-search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search Suggestions Section */
.search-suggestions {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.search-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.75rem 0;
    padding: 0 0.5rem;
}

.popular-searches,
.recent-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-suggestion-tag {
    padding: 0.5rem 1rem;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.813rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-suggestion-tag:hover {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #ffffff;
}

.recent-searches .search-suggestion-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Live Results */
.live-search-results {
    padding: 0.5rem;
}

.live-result-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.live-result-item:hover {
    background: #f8f8f8;
}

.live-result-image {
    width: 50px;
    /* Reduced from 60px */
    height: 50px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}

.live-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-result-content {
    flex: 1;
    min-width: 0;
}

.live-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.live-result-price {
    font-weight: 600;
    color: #0a0a0a;
}

.live-result-category {
    color: #999;
}

.live-search-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f8f8;
    border-radius: 0 0 12px 12px;
}

.view-all-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0a;
    color: #ffffff;
    border: 1px solid #0a0a0a;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-all-results:hover {
    background: #ffffff;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.no-live-results {
    padding: 2rem;
    text-align: center;
    color: #999;
}

/* Loading State */
.live-search-loading {
    padding: 2rem;
    text-align: center;
}

.search-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #f0f0f0;
    border-top-color: #0a0a0a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   MOBILE SEARCH OVERLAY
   ================================ */

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-search-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-search-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    /* Compact header */
    border-bottom: 1px solid #eee;
    background: #fff;
    color: #333;
}

.mobile-search-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.mobile-search-close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
}

.mobile-search-overlay form {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

/* Force visibility of wrapper in case global styles hide .search-bar on mobile */
.mobile-search-overlay .search-bar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    background: #f9fafb;
}

.mobile-search-input:focus {
    outline: none;
    border-color: #0a0a0a;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.1);
}