@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --ps-primary: #0072CE;
    --ps-text: #444444;
    --ps-text-light: #666666;
    --ps-white: #ffffff;
    --ps-border: #e5e7eb;
    --ps-font-family: 'Manrope', sans-serif;
    --ps-transition: 150ms ease;
}

* {
    box-sizing: border-box;
}

.ps-header {
    font-family: var(--ps-font-family);
    width: 100%;
}

.ps-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.ps-top-bar {
    background: var(--ps-primary);
    padding: 12px 0;
}

.ps-top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.ps-logo {
    flex-shrink: 0;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.ps-logo img {
    height: 36px !important;
    width: auto;
    display: block;
}

.ps-search-wrapper {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.ps-search-container {
    position: relative;
    width: 100%;
}

.ps-search-input-wrapper {
    position: relative;
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all var(--ps-transition);
}

.ps-search-input-wrapper:focus-within {
    border-color: var(--ps-primary);
    box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.1);
}

.ps-search-icon {
    color: #6b7280;
    margin-right: 12px;
    flex-shrink: 0;
}

.ps-search-input {
    width: 100%;
    height: 48px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #1f2937;
    background: transparent;
    font-family: var(--ps-font-family);
}

.ps-search-input::placeholder {
    color: #9ca3af;
}

.ps-clear-button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--ps-transition);
    flex-shrink: 0;
}

.ps-clear-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.ps-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.ps-search-overlay.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ps-search-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ps-filter-tabs {
    display: flex;
    padding: 12px 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ps-filter-tab {
    background: none;
    border: none;
    padding: 8px 12px;
    margin-right: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--ps-transition);
    font-family: var(--ps-font-family);
}

.ps-filter-tab:hover {
    background: #f9fafb;
    color: #374151;
}

.ps-filter-tab.active {
    color: var(--ps-primary);
    background: rgba(0, 114, 206, 0.1);
}

.ps-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
}

.ps-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--ps-primary);
    border-radius: 50%;
    animation: ps-spin 1s linear infinite;
    margin-bottom: 12px;
}

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

.ps-results-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 400px;
}

.ps-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all var(--ps-transition);
    border-left: 3px solid transparent;
}

.ps-result-item:hover {
    background: #f9fafb;
    border-left-color: var(--ps-primary);
}

.ps-result-icon {
    width: 60px;
    height: 60px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.ps-result-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ps-result-info {
    flex: 1;
    min-width: 0;
}

.ps-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
}

.ps-result-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.ps-result-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ps-price-current {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.ps-price-original {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
}

.ps-discount-badge {
    background: var(--ps-primary);
    color: var(--ps-white);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.ps-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.ps-no-results-icon {
    color: #d1d5db;
    margin-bottom: 16px;
}

.ps-no-results h3 {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 8px;
}

.ps-no-results p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.ps-search-footer {
    padding: 12px 16px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    border-radius: 0 0 12px 12px;
}

.ps-footer-controls {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.ps-footer-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

kbd {
    background: var(--ps-white);
    border: 1px solid #d1d5db;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.ps-mobile-search-btn {
    display: none;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--ps-transition);
    color: var(--ps-white);
    background: rgba(255, 255, 255, 0.1);
}

.ps-mobile-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ps-nav-bar {
    background: var(--ps-white);
    border-bottom: 1px solid var(--ps-border);
    position: relative;
}

.ps-navigation {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ps-mega-menu {
    position: static;
}

.ps-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--ps-white);
    cursor: pointer;
    font-family: var(--ps-font-family);
    font-size: 16px;
    font-weight: 600;
    color: var(--ps-text);
    transition: all var(--ps-transition);
    border: none;
}

.ps-menu-trigger:hover {
    color: var(--ps-primary);
}

.ps-menu-icon {
    flex-shrink: 0;
}

.ps-menu-trigger-icon {
    display: flex;
    transition: transform var(--ps-transition);
}

.ps-menu-trigger[aria-expanded="true"] .ps-menu-trigger-icon {
    transform: rotate(180deg);
}

.ps-mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--ps-white);
    border-top: 1px solid var(--ps-border);
    border-bottom: 1px solid var(--ps-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--ps-transition), visibility var(--ps-transition), transform var(--ps-transition);
    z-index: 1000;
}

.ps-mega-menu-dropdown.is-open {
	height: 700px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ps-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ps-menu-item {
    position: relative;
}

.ps-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: var(--ps-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--ps-transition);
}

.ps-menu-link:hover {
    color: var(--ps-primary);
    background: #f8fafc;
}

.ps-menu-text {
    flex: 1;
}

.ps-menu-arrow {
    color: var(--ps-text-light);
    font-size: 16px;
    margin-left: 12px;
}

.ps-menu-link:hover .ps-menu-arrow {
    color: var(--ps-primary);
}

.ps-submenu {
    list-style: none;
    margin: 0;
    display: none;
}

.ps-top-categories {
    display: flex;
    gap: 40px;
    align-items: center;
}

.ps-category-link {
    color: var(--ps-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--ps-transition);
    padding: 12px 0;
}

.ps-category-link:hover {
    color: var(--ps-primary);
}

.ps-mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ps-white);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.ps-mobile-search-modal.show {
    opacity: 1;
    transform: translateY(0);
}

.ps-mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ps-mobile-backdrop.show {
    opacity: 1;
}

.ps-mobile-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    padding-top: 60px;
}

.ps-mobile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ps-mobile-modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.ps-mobile-close-button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all var(--ps-transition);
}

.ps-mobile-close-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.ps-mobile-search-input-wrapper {
    position: relative;
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all var(--ps-transition);
    margin-bottom: 20px;
}

.ps-mobile-search-input-wrapper:focus-within {
    border-color: var(--ps-primary);
    box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.1);
}

.ps-mobile-results-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .ps-mega-menu-dropdown {
        display: flex;
        height: 450px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .ps-menu-list {
        padding: 8px 0;
        min-width: 280px;
        width: 280px;
        height: 100%;
        overflow-y: auto;
        border-right: 1px solid var(--ps-border);
        flex-shrink: 0;
    }
    
    .ps-menu-list:first-child {
        padding-left: 20px;
    }
    
    .ps-menu-list:last-child {
        border-right: none;
    }
    
    .ps-submenu {
        padding: 8px 0;
        min-width: 280px;
        width: 280px;
        height: 100%;
        overflow-y: auto;
        border-right: 1px solid var(--ps-border);
        flex-shrink: 0;
        display: none !important;
    }
    
    .ps-mega-menu-dropdown > .ps-submenu {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .ps-mobile-search-btn {
        display: flex;
        margin-left: auto;
    }
    
    .ps-top-bar {
        padding: 10px 0;
    }
    
    .ps-top-bar-inner {
        gap: 12px;
        position: relative;
    }
    
    .ps-logo {
        position: static;
        left: 40px;
        top: auto;
        transform: none;
    }
    
    .ps-logo img {
        height: 28px !important;
    }
    
    .ps-container {
        padding: 0 16px;
    }
    
    .ps-menu-trigger {
        width: 100%;
		padding-left: 0px;
		padding-right: 0px;
		padding-top: 10px;
		padding-bottom: 10px;
        justify-content: space-between;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--ps-border);
    }
    
    .ps-mega-menu-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        margin-left: 0;
        transform: translateX(100%);
        border: none;
        overflow-y: auto;
        overflow-x: hidden;
        flex-direction: column;
        z-index: 9999;
    }
    
    .ps-mega-menu-dropdown.is-open {
        transform: translateX(0);
    }
    
    .ps-mobile-header {
        position: sticky;
        top: 0;
        background: var(--ps-white);
        border-bottom: 1px solid var(--ps-border);
        padding: 16px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 10;
    }
    
    .ps-mobile-back {
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        color: var(--ps-primary);
        font-family: var(--ps-font-family);
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
    }
    
    .ps-mobile-back:disabled {
        opacity: 0;
        pointer-events: none;
    }
    
    .ps-mobile-title {
        flex: 1;
        text-align: center;
        font-size: 18px;
        font-weight: 700;
        color: var(--ps-text);
    }
    
    .ps-mobile-close {
        background: none;
        border: none;
        color: var(--ps-primary);
        cursor: pointer;
        padding: 0;
        font-size: 24px;
        line-height: 1;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .ps-mobile-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ps-menu-list {
        padding: 0;
        width: 100%;
        display: block !important;
    }
    
    .ps-submenu {
        padding: 0;
        width: 100%;
    }
    
    .ps-menu-item {
        border-bottom: 1px solid var(--ps-border);
    }
    
    .ps-menu-link {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .ps-view-all .ps-menu-link {
        background: #f8fafc;
    }
}