/* =============================================
   SHOP MODAL - FULL SCREEN PRODUCT CATALOG
   ============================================= */
.shop-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.shop-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.shop-modal-panel {
    background: var(--bg-primary);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: shopSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes shopSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Header Section */
.shop-modal-header {
    background: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.shop-modal-title-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.shop-modal-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}

.shop-modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1;
}

.shop-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

/* Controls (Search & Filter) */
.shop-modal-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 600px;
    justify-content: flex-end;
}

.shop-search-wrap {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.shop-search-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.shop-search-wrap input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.shop-search-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-secondary);
}

/* Left Sidebar Filters */
.shop-sidebar {
    width: 250px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.shop-filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.shop-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shop-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.shop-category-label:hover {
    background: var(--bg-tertiary);
}

.shop-category-label input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.shop-home-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.shop-home-btn:hover {
    background: var(--primary-hover, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.shop-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-close-btn:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* Body / Grid Section */
.shop-modal-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}

/* Empty & Loading States */
.shop-loading, .shop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
    color: var(--text-muted);
}

.shop-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.shop-empty h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.shop-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: shopSpin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes shopSpin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar for Shop Modal */
.shop-modal-body::-webkit-scrollbar {
    width: 8px;
}
.shop-modal-body::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
.shop-modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
.shop-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shop-modal-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 1rem;
    }
    
    .shop-modal-controls {
        max-width: none;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .shop-search-wrap {
        order: 3;
        max-width: none;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .shop-main-area {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
        display: flex;
        flex-direction: row;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        gap: 1.5rem;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .shop-sidebar::-webkit-scrollbar {
        height: 4px;
    }
    .shop-sidebar::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }
    
    .shop-filter-group {
        display: flex;
        align-items: center;
        margin-top: 0 !important;
        gap: 0.5rem;
    }
    
    .shop-filter-title {
        margin-bottom: 0;
        font-size: 0.95rem;
    }
    
    .shop-category-list {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .shop-category-label {
        background: var(--bg-tertiary);
        padding: 0.4rem 1rem;
        border-radius: 20px;
        font-size: 0.85rem;
        border: 1px solid transparent;
    }
    
    .shop-category-label input {
        display: none;
    }
    
    .shop-category-label:has(input:checked) {
        background: rgba(99, 102, 241, 0.1);
        color: var(--primary);
        border-color: var(--primary);
        font-weight: 600;
    }
    
    .shop-close-btn {
        order: 2;
    }
    
    .shop-modal-body {
        padding: 1rem;
    }
    
    .shop-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}
