* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Bundle Builder Layout */
.bundle-builder {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

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

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

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.product-price {
    font-size: 1rem;
    color: #666;
    margin-bottom: 16px;
}

.add-to-bundle-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 0 0 12px 12px;
}

.add-to-bundle-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.add-to-bundle-btn.added {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.add-to-bundle-btn.added .btn-text::after {
    content: "d";
}

.add-to-bundle-btn.added .btn-icon {
    content: "✓";
}

/* Bundle Sidebar */
.bundle-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
}

.sidebar-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Selected Products */
.selected-products {
    margin-bottom: 24px;
    min-height: 120px;
}

.selected-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.selected-product:last-child {
    border-bottom: none;
}

.selected-product-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.selected-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-product-info {
    flex: 1;
}

.selected-product-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2px;
}

.selected-product-price {
    font-size: 0.85rem;
    color: #666;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #666;
}

.quantity-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.quantity-display {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
}

.remove-btn:hover {
    background: #f8f9fa;
}

/* Pricing Summary */
.pricing-summary {
    border-top: 1px solid #e9ecef;
    padding-top: 16px;
    margin-bottom: 24px;
}

.discount-row,
.subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.discount-row {
    color: #28a745;
    font-size: 0.9rem;
}

.subtotal-row {
    font-size: 1.1rem;
}

/* CTA Button */
.add-to-cart-btn {
    width: 100%;
    padding: 16px 24px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:not(:disabled) {
    background: #28a745;
    cursor: pointer;
}

.add-to-cart-btn:not(:disabled):hover {
    background: #218838;
    transform: translateY(-1px);
}

.checkmark {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.add-to-cart-btn:not(:disabled) .checkmark {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .bundle-builder {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .bundle-sidebar {
        position: static;
        order: -1;
    }

    .product-card {
        border-radius: 8px;
    }

    .product-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .bundle-sidebar {
        padding: 20px;
    }
}
