.constructor-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.constructor-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #2c2c2c;
    text-align: center;
}

.constructor-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.constructor-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.constructor-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c2c2c;
    text-align: center;
}

.quantity-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.quantity-circle:hover {
    background: #e0e0e0;
}

.quantity-circle.selected {
    background: #b33b3b;
    color: white;
    border-color: #8f2f2f;
}

.selected-quantity {
    font-size: 18px;
    font-weight: 600;
    color: #b33b3b;
    margin-top: 15px;
}

.remaining-info {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
}

.remaining-info span {
    font-weight: 700;
    color: #b33b3b;
}

.chocolate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chocolate-item {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.chocolate-item.selected {
    border-color: #b33b3b;
    background: #fff5f5;
}

.chocolate-image {
    width: 100%;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.chocolate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chocolate-name {
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-bottom: 10px;
}

.chocolate-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.counter-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover {
    background: #f0f0f0;
}

.counter-input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 0;
    padding-left: 10px;
    font-weight: 600;
    box-sizing: border-box;
}

.toppings-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.toppings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.topping-item {
    position: relative;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.topping-item:hover {
    background: #f0f0f0;
}

.topping-item.selected {
    border-color: #b33b3b;
    background: #fff5f5;
}

.topping-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.topping-item span {
    font-size: 13px;
    font-weight: 500;
}

.topping-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.constructor-total {
    background: white;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}

.grand-total {
    font-size: 22px;
    font-weight: 700;
    color: #b33b3b;
    margin-top: 15px;
    padding-top: 30px;
    border-top: 1px dashed #ccc;
}

.add-to-cart-btn {
    width: 100%;
    background: #b33b3b;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 20px;
}

.add-to-cart-btn:hover {
    background: #8f2f2f;
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .constructor-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .chocolate-grid,
    .toppings-grid {
        grid-template-columns: 1fr;
    }
    
    .constructor-title {
        font-size: 32px;
    }
}