/* ===============================
   MOBILE SEARCH MODAL - COMPACT PREMIUM
================================ */

.pf-mobile-search-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    box-shadow: -6px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-mobile-search-modal.active {
    right: 0;
}

.pf-mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.pf-mobile-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* COMPACT HEADER WITH SEARCH */
.pf-mobile-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.pf-mobile-search-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #111827;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pf-mobile-search-back:active {
    background: #f3f4f6;
    transform: scale(0.92);
}

.pf-mobile-search-back svg {
    width: 20px;
    height: 20px;
}

/* SEARCH INPUT IN HEADER */
.pf-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.pf-search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.2s ease;
}

.pf-search-input-wrapper:focus-within .pf-search-icon {
    color: #111827;
}

.pf-mobile-search-input {
    width: 100%;
    padding: 10px 40px 10px 38px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.pf-mobile-search-input:focus {
    outline: none;
    border-color: #d1d5db;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03);
}

.pf-mobile-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.pf-search-clear {
    position: absolute;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.pf-search-clear:active {
    background: #f3f4f6;
    color: #111827;
    transform: scale(0.9);
}

.pf-search-clear svg {
    width: 16px;
    height: 16px;
}

/* RESULTS CONTAINER */
.pf-mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 20px;
    background: #fafafa;
}

/* PREMIUM EMPTY STATE */
.pf-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 32px;
    text-align: center;
}

.pf-empty-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 1px solid #f0f0f0;
}

.pf-empty-icon svg {
    width: 32px;
    height: 32px;
    color: #d1d5db;
}

.pf-empty-text {
    margin: 0;
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

/* LOADING STATE */
.pf-mobile-search-loading {
    position: absolute;
    top: 62px;
    left: 0;
    width: 100%;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    z-index: 10;
}

.pf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top-color: #111827;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SEARCH ITEM - COMPACT */
.pf-search-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #111;
    background: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 6px;
    border: 1px solid #f3f4f6;
    position: relative;
}

.pf-search-item:active {
    background: #111827;
    border-color: #111827;
    transform: translateX(4px) scale(0.98);
}

.pf-search-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #111827;
    border-radius: 10px 0 0 10px;
    transition: width 0.2s ease;
}

.pf-search-item:active::before {
    width: 3px;
}

.pf-search-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #f9fafb;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.pf-search-item:active .pf-search-thumb {
    transform: scale(1.05);
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pf-search-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pf-search-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.pf-search-item:active .pf-search-title {
    color: #ffffff;
}

.pf-search-price {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    transition: color 0.2s ease;
}

.pf-search-item:active .pf-search-price {
    color: #ffffff;
}

.pf-search-price del {
    color: #9ca3af;
    margin-right: 6px;
    font-weight: 400;
    font-size: 12px;
}

.pf-search-item:active .pf-search-price del {
    color: #e5e7eb;
}

/* VIEW ALL BUTTON - COMPACT */
.pf-search-trigger .pf-view-all {
    display: block;
    margin: 8px 6px 6px;
    padding: 14px 18px;
    text-align: center;
    color: #ffffff;
    background: #111827;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-search-trigger .pf-view-all:active {
    transform: scale(0.97);
    background: #000000;
}

/* NO RESULTS */
.pf-no-results {
    padding: 60px 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

/* SCROLLBAR */
.pf-mobile-search-results::-webkit-scrollbar {
    width: 4px;
}

.pf-mobile-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.pf-mobile-search-results::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 2px;
}

.pf-mobile-search-results::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* PREVENT BODY SCROLL */
body.mobile-search-open {
    overflow: hidden;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .pf-mobile-search-modal {
        max-width: 100%;
    }
    
    .pf-mobile-search-header {
        padding: 10px 12px;
    }
    
    .pf-search-item {
        padding: 9px;
        gap: 10px;
    }
    
    .pf-search-thumb {
        width: 54px;
        height: 54px;
    }
}

/* ANIMATIONS */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pf-mobile-search-modal.active {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}