* {
    box-sizing: border-box;
}

#cbb-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Progress Bar */
.cbb-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    position: relative;
}

.cbb-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.cbb-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cbb-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.cbb-progress-step.active .cbb-progress-circle {
    background: #8B4789;
    color: white;
}

.cbb-progress-step.completed .cbb-progress-circle {
    background: #4CAF50;
    color: white;
}

.cbb-progress-label {
    font-size: 14px;
    color: #666;
}

.cbb-progress-step.active .cbb-progress-label {
    color: #8B4789;
    font-weight: 600;
}

/* Steps Container */
.cbb-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.cbb-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step 1: Choose Shape */
#step-1 {
    text-align: center;
}

#step-1 h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #333;
}

#step-1 .subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
}

.cbb-shapes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.cbb-shape {
    border: 3px solid #e0e0e0;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    background: white;
    position: relative;
    overflow: hidden;
}

.cbb-shape::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 71, 137, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cbb-shape:hover {
    border-color: #8B4789;
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 71, 137, 0.2);
}

.cbb-shape:hover::before {
    opacity: 1;
}

.cbb-shape.selected {
    border-color: #8B4789;
    background: #f9f5f9;
    box-shadow: 0 10px 30px rgba(139, 71, 137, 0.3);
}

.cbb-shape.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #8B4789;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cbb-shape img {
    width: 100%;
    max-width: 200px;
    height: 250px;
    object-fit: cover;
    margin: 0 auto 20px;
    border-radius: 12px;
    display: block;
}

.cbb-shape-title {
    font-size: 20px;
    font-weight: 700;
    margin: 15px 0 8px;
    color: #333;
}

.cbb-shape-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.cbb-continue-btn {
    display: inline-block;
    padding: 16px 50px;
    background: #8B4789;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
}

.cbb-continue-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.cbb-continue-btn:hover {
    background: #6d3669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 71, 137, 0.4);
}

/* Step 2: Select Flowers */
#step-2 h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.cbb-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.cbb-back-btn:hover {
    background: #e0e0e0;
}

.cbb-layout {
    display: grid;
    grid-template-columns: 280px 1fr 360px;
    gap: 25px;
    margin-top: 30px;
}

/* Filters */
.cbb-filters {
    background: white;
    padding: 25px;
    border-radius: 16px;
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid #e0e0e0;
}

.cbb-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 3px solid #8B4789;
}

.cbb-filters label {
    display: flex;
    align-items: center;
    margin: 12px 0;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 6px;
    font-size: 15px;
}

.cbb-filters label:hover {
    background: #f9f5f9;
    color: #8B4789;
}

.cbb-filters input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8B4789;
}

/* Flowers Grid */
.cbb-flowers-container {
    min-height: 500px;
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
}

#cbb-flowers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.cbb-flower-item {
    border: 2px solid #e0e0e0;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s;
    background: white;
}

.cbb-flower-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: #8B4789;
}

.cbb-flower-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.cbb-flower-item h4 {
    font-size: 15px;
    margin: 10px 0;
    color: #333;
    min-height: 40px;
    line-height: 1.4;
}

.cbb-flower-item .price {
    color: #8B4789;
    font-weight: 700;
    margin: 8px 0;
    font-size: 16px;
}

.cbb-flower-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.cbb-flower-controls button {
    width: 36px;
    height: 36px;
    border: 2px solid #8B4789;
    background: white;
    cursor: pointer;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #8B4789;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbb-flower-controls button:hover {
    background: #8B4789;
    color: white;
    transform: scale(1.1);
}

.cbb-flower-controls span {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

/* Preview Cart */
.cbb-preview {
    background: white;
    padding: 25px;
    border-radius: 16px;
    position: sticky;
    top: 20px;
    height: fit-content;
    border: 1px solid #e0e0e0;
}

.cbb-preview h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 3px solid #8B4789;
}

#bouquet-preview {
    text-align: center;
    margin: 20px 0;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
}

#preview-template {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.3);
    transition: filter 0.5s ease;
    margin: 0 auto;
    display: block;
}

#preview-template.colored {
    filter: grayscale(0%) brightness(1);
}

#selected-flowers {
    margin: 20px 0;
    max-height: 240px;
    overflow-y: auto;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
}

#selected-flowers:empty::before {
    content: 'No flowers selected yet';
    color: #999;
    font-style: italic;
    display: block;
    text-align: center;
}

#selected-flowers::-webkit-scrollbar {
    width: 6px;
}

#selected-flowers::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#selected-flowers::-webkit-scrollbar-thumb {
    background: #8B4789;
    border-radius: 10px;
}

.selected-flower-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.selected-flower-item:last-child {
    border-bottom: none;
}

.selected-flower-name {
    flex: 1;
    text-align: left;
    color: #333;
}

.selected-flower-price {
    color: #8B4789;
    font-weight: 600;
}

.cbb-total {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #8B4789, #6d3669);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.cbb-total strong {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

#total-price {
    font-size: 32px;
    font-weight: bold;
}

#add-to-cart-btn {
    width: 100%;
    padding: 16px;
    background: #8B4789;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#add-to-cart-btn:hover:not(:disabled) {
    background: #6d3669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 71, 137, 0.4);
}

#add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading State */
.cbb-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.cbb-loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Empty State */
.cbb-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.cbb-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .cbb-layout {
        grid-template-columns: 1fr;
    }
    
    .cbb-filters {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    
    .cbb-preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .cbb-shapes {
        grid-template-columns: 1fr;
    }
    
    .cbb-filters {
        grid-template-columns: 1fr;
    }
    
    #cbb-flowers-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .cbb-progress::before {
        left: 20%;
        right: 20%;
    }
}