/* Membership Product Selector - Frontend Styles */

.mps-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mps-header {
    text-align: center;
    margin-bottom: 30px;
}

.mps-header h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.mps-description {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.mps-step {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mps-step h4 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Category Selection */
.mps-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mps-category-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mps-category-item:hover {
    transform: translateY(-2px);
}

.mps-category-card {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mps-category-item:hover .mps-category-card {
    border-color: #0073aa;
}

.mps-category-item.selected .mps-category-card {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.mps-category-card h5 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.mps-category-card p {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.4;
}

.mps-category-count {
    color: #0073aa;
    font-size: 14px;
    font-weight: 500;
}

/* Product Selection */

.mps-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mps-product-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.mps-product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mps-product-card {
    padding: 20px;
}

.mps-product-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mps-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mps-no-image {
    color: #999;
    font-size: 14px;
}

.mps-product-info {
    margin-bottom: 15px;
}

.mps-product-name {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.mps-product-price {
    color: #0073aa;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.mps-product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.mps-product-status {
    margin-bottom: 15px;
}

.mps-in-stock {
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 4px;
}

.mps-out-of-stock {
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
    background: #f8d7da;
    padding: 4px 8px;
    border-radius: 4px;
}

.mps-product-actions {
    border-top: 1px solid #e1e5e9;
    padding-top: 15px;
}

.mps-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.mps-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.mps-checkbox-label:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Selection Summary */
.mps-selection-summary {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mps-selected-count {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mps-max-selections {
    font-size: 14px;
    color: #666;
}

/* Selected Products Review */
.mps-selected-list {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 100px;
}

.mps-selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e1e5e9;
}

.mps-selected-item:last-child {
    border-bottom: none;
}

.mps-selected-item-info {
    flex: 1;
}

.mps-selected-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.mps-selected-item-price {
    color: #0073aa;
    font-size: 14px;
}

.mps-selected-item-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mps-selected-item-remove:hover {
    background: #c82333;
}

/* Buttons */
.mps-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.mps-btn:last-child {
    margin-right: 0;
}

.mps-btn-primary {
    background: #0073aa;
    color: white;
}

.mps-btn-primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.mps-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.mps-btn-secondary {
    background: #6c757d;
    color: white;
}

.mps-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.mps-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Messages */
.mps-messages {
    margin-top: 20px;
}

.mps-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
}

.mps-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mps-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mps-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.mps-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.mps-no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mps-container {
        padding: 15px;
    }
    
    .mps-category-grid {
        grid-template-columns: 1fr;
    }
    
    .mps-products-grid {
        grid-template-columns: 1fr;
    }
    
    .mps-selection-summary {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .mps-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .mps-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .mps-btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .mps-header h3 {
        font-size: 24px;
    }
    
    .mps-step {
        padding: 20px;
    }
    
    .mps-step h4 {
        font-size: 18px;
    }
}
