/**
 * Search Styles - Ultra Clean
 * Minimal & Professional
 */

/* ============================
   Desktop Search Bar
   ============================ */
.pc-search-bar {
    position: relative;
    width: 100%;
    max-width: 56rem;
    display: block;
}

.pc-search-bar-inner {
    position: relative;
    width: 100%;
}

.pc-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pc-search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.25rem;
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--pc-white);
    color: var(--pc-text);
}

.pc-search-input:focus {
    outline: none;
    border-color: var(--pc-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.pc-search-input::placeholder {
    color: var(--pc-text-muted);
}

/* Search Icon Button - Clean */
.pc-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--pc-text-muted);
    transition: all 0.15s ease;
}

.pc-search-btn:hover {
    color: var(--pc-primary);
}

.pc-search-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
}

/* ============================
   Search Suggestions Dropdown
   ============================ */
.pc-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 600px !important;
    background: var(--pc-white);
    border-radius: var(--pc-radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pc-search-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pc-suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pc-border-light);
    background: linear-gradient(to right, var(--pc-primary-50), var(--pc-white));
}

.pc-suggestions-header p {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pc-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pc-suggestions-count {
    background: linear-gradient(135deg, var(--pc-primary) 0%, var(--pc-primary-dark) 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: var(--pc-radius-full);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.pc-suggestions-list {
    max-height: 28rem;
    overflow-y: auto;
}

.pc-suggestions-list::-webkit-scrollbar {
    width: 6px;
}

.pc-suggestions-list::-webkit-scrollbar-track {
    background: var(--pc-background);
}

.pc-suggestions-list::-webkit-scrollbar-thumb {
    background: var(--pc-primary-200);
    border-radius: 3px;
}

.pc-suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--pc-border-light);
    position: relative;
    overflow: hidden;
}

.pc-suggestion-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--pc-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pc-suggestion-item:hover {
    background: linear-gradient(to right, var(--pc-primary-50), var(--pc-white));
}

.pc-suggestion-item:hover::before {
    opacity: 1;
}

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

.pc-suggestion-image {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: var(--pc-radius);
    background: var(--pc-background);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.pc-suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-suggestion-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pc-background);
    border-radius: var(--pc-radius);
}

.pc-suggestion-image-placeholder svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--pc-text-muted);
}

.pc-suggestion-item:hover .pc-suggestion-image {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pc-suggestion-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pc-suggestion-type {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    background: var(--pc-accent);
    padding: 0.125rem 0.5rem;
    border-radius: var(--pc-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.pc-suggestion-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pc-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.pc-suggestion-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pc-suggestion-category {
    font-size: 0.75rem;
    color: var(--pc-text-muted);
    background: var(--pc-background);
    padding: 0.125rem 0.5rem;
    border-radius: var(--pc-radius-sm);
}

.pc-suggestion-price {
    font-size: 0.8125rem;
    color: var(--pc-primary);
    font-weight: 700;
}

.pc-suggestion-arrow {
    color: var(--pc-primary);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.pc-suggestion-item:hover .pc-suggestion-arrow {
    opacity: 1;
    transform: translateX(0);
}

.pc-no-results {
    padding: 2.5rem;
    text-align: center;
    color: var(--pc-text-muted);
}

.pc-suggestions-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--pc-border-light);
    background: var(--pc-background);
    text-align: center;
}

.pc-view-all-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
    text-decoration: none;
    background: linear-gradient(to right, #f0fdf4, #ffffff);
    border-top: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pc-view-all-results:hover {
    color: #047857;
    background: linear-gradient(to right, #dcfce7, #f0fdf4);
    gap: 0.75rem;
}

.pc-search-suggestions.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--pc-border);
    border-top-color: var(--pc-primary);
    border-radius: 50%;
    animation: pc-spinner 0.8s linear infinite;
}

/* ============================
   Mobile Search
   ============================ */
@media (max-width: 768px) {
    .pc-search-bar {
        max-width: 100%;
    }

    .pc-search-input {
        padding: 0.875rem 3rem 0.875rem 1rem;
        font-size: 1rem;
    }

    .pc-search-btn {
        right: 0.5rem;
        padding: 0.25rem;
    }
}
