#build-a-box-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 20px;
    font-family: 'Helvetica Neue', sans-serif;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    position: relative;
}

.bab-step h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.bab-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.bab-step.active {
    display: block;
}

.bab-products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.bab-product {
    width: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    flex: 1 1 calc(33.33% - 40px); /* 3 items per row with gap */
    max-width: 220px;
    min-width: 160px;
}

.bab-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.bab-product img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    border-radius: 12px;
}

.bab-product p {
    margin: 5px 0;
    font-size: 14px;
}

.bab-product.selected {
    border-color: #2196f3;
    background-color: #e3f2fd;
}

.bab-controls {
    margin-top: 30px;
    text-align: center;
}

.bab-btn {
     background-color: #00bcd4;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    margin: 10px 5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.3s ease, transform 0.2s ease;
}


.bab-btn:hover {
    background-color: #1976d2;
}

.bab-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.bab-card-form {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.bab-card-form label {
    margin-top: 10px;
    font-weight: bold;
}

.bab-card-form input,
.bab-card-form textarea {
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.bab-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 16px;
    margin-top: 40px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.bab-summary-total {
    font-size: 22px;
    color: #0097a7;
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
}

.bab-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.75);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.bab-loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #00bcd4;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: bab-spin 1s linear infinite;
}

#bab-summary {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 16px;
    margin-top: 40px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

#bab-summary h3 {
    margin-top: 0;
    font-size: 18px;
}

#bab-total {
    font-size: 20px;
    font-weight: bold;
    color: #00bcd4;
    margin-top: 10px;
} 
#bab-thank-you-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bab-thank-you-content {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.5s ease-out;
}

.bab-thank-you-content img {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}

.bab-thank-you-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #00bcd4;
}
.bab-thank-you-inner {
    text-align: center;
    padding: 40px;
}

.bab-thank-you-inner img {
    width: 120px;
    margin-bottom: 20px;
}

.bab-thank-you-inner p {
    font-size: 18px;
    color: #333;
}
.bab-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    z-index: 10;
    position: relative;
}

#bab-search {
    /*flex: 1;*/
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#bab-sort {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}
@keyframes bab-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 768px) {
    .bab-product {
        flex: 1 1 calc(50% - 20px);
    }
}
@media (max-width: 480px) {
    .bab-product {
        flex: 1 1 100%;
    }
}