/* Portfolio Manager Pro Frontend Styles */

/* Container and Layout */
.pmp-portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filters Section */
.pmp-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.pmp-search {
    flex: 1;
    min-width: 250px;
}

.pmp-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.pmp-search input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.pmp-category-filter select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.pmp-category-filter select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Products Grid */
.pmp-products-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.pmp-products-grid[data-columns="1"] { grid-template-columns: 1fr; }
.pmp-products-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.pmp-products-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.pmp-products-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.pmp-products-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.pmp-products-grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

/* Product Cards */
.pmp-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
}

.pmp-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.pmp-product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.pmp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pmp-product-card:hover .pmp-product-image img {
    transform: scale(1.05);
}

.pmp-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.pmp-product-info {
    padding: 20px;
}

.pmp-product-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #2c3e50;
    line-height: 1.3;
}

.pmp-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 6px;
}

.pmp-product-quantity {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 16px;
    font-weight: 500;
}

.pmp-quick-view-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pmp-quick-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

/* No Products Message */
.pmp-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 16px;
}

/* Modal Styles */
.pmp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pmp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.pmp-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pmp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pmp-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.pmp-modal-body {
    display: flex;
    flex-direction: column;
}

.pmp-modal-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: #f8f9fa;
}

.pmp-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pmp-modal-details {
    padding: 30px;
}

.pmp-modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #2c3e50;
    line-height: 1.2;
}

.pmp-modal-price {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 12px;
}

.pmp-modal-quantity {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-weight: 600;
}

.pmp-modal-category {
    font-size: 14px;
    color: #3498db;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pmp-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #34495e;
}

/* Categories List */
.pmp-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.pmp-category-item {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.pmp-category-item:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.1);
}

.pmp-category-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
}

.pmp-category-name {
    font-weight: 600;
    color: #2c3e50;
}

.pmp-category-count {
    color: #7f8c8d;
    font-size: 14px;
    margin-left: 8px;
}

.pmp-category-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pmp-products-grid[data-columns="3"],
    .pmp-products-grid[data-columns="4"],
    .pmp-products-grid[data-columns="5"],
    .pmp-products-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pmp-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pmp-search {
        min-width: auto;
    }
    
    .pmp-modal-body {
        flex-direction: column;
    }
    
    .pmp-modal-details {
        padding: 20px;
    }
    
    .pmp-modal-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .pmp-products-grid[data-columns="2"],
    .pmp-products-grid[data-columns="3"],
    .pmp-products-grid[data-columns="4"],
    .pmp-products-grid[data-columns="5"],
    .pmp-products-grid[data-columns="6"] {
        grid-template-columns: 1fr;
    }
    
    .pmp-portfolio-container {
        padding: 15px;
    }
    
    .pmp-product-image {
        height: 180px;
    }
}

/* Loading Animation */
.pmp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hidden class for filtering */
.pmp-product-card.hidden {
    display: none;
}

